code: public <T> T get(@NonNull String key, @NonNull Class<T> classOfT, T defaultValue) {
      Preconditions.checkNotNull(key, KEY_IS_NULL);
      Preconditions.checkNotNull(classOfT, CLASS_OF_T_IS_NULL);
  
      if (!contains(key) && defaultValue == null) {
        return null;
      }
  
      return get(key, TypeToken.fromClass(classOfT), defaultValue);
    }
docs: Gets value from SharedPreferences with a given key and type.
  If value is not found, we can return defaultValue.
  
  @param key key of the preference
  @param classOfT class of T (e.g. {@code String.class})
  @param defaultValue default value of the preference (e.g. "" or "undefined")
  @param <T> return type of the preference (e.g. String)
  @return value from SharedPreferences associated with given key or default value