code: public <T> T get(String key, T defaultValue) {
          Class type;
          if (defaultValue == null) {
              type = Object.class;
          } else {
              type = defaultValue.getClass();
          }
          Object value = get(key, type);
  
          if (value == null) {
              return defaultValue;
          }
          return (T) value;
      }
docs: Return the value for the given key converted to the type of the default value.
  If the value is null, defaultValue is returned.
  Conversion is done using {@link #get(String, Class)}