code: protected <T> T getOptionalValue(String propertyName, T defaultValue, Class<T> propertyType) {
  
          T result = ConfigOptionalValue.getValue(propertyName, propertyType);
          if (result == null) {
              result = defaultValue;
          }
          return result;
      }
docs: Reads the configuration property as an optional value, so it is not required to have a value for the key/propertyName, and
  returns the <code>defaultValue</code> when the value isn't defined.
  
  @param <T>          the property type
  @param propertyName The configuration propertyName.
  @param propertyType The type into which the resolve property value should be converted
  @return the resolved property value as an value of the requested type. (defaultValue when not found)