public <T> Optional<T> getOptional(ConfigOption<T> option) {
    Optional<Object> rawValue = getRawValueFromOption(option);
    Class<?> clazz = option.getClazz();

    try {
      if (option.isList()) {
        return rawValue.map(v -> ConfigHelpers.convertToList(v, clazz));
      } else {
        return rawValue.map(v -> ConfigHelpers.convertValue(v, clazz));
      }
    } catch (Exception e) {
      throw new IllegalArgumentException(
          String.format(
              "Could not parse value '%s' for key '%s'.",
              rawValue.map(Object::toString).orElse(""), option.key()),
          e);
    }
  }
Checks whether there is an entry for the given config option.

@param configOption The configuration option
@return <tt>true</tt> if a valid (current or deprecated) key of the config option is stored,
    <tt>false</tt> otherwise
amoro-common/src/main/java/org/apache/amoro/config/Configurations.java