code: public static <T> Optional<T> get(Config config, Function<String, T> getter, String path) {
      if (!config.hasPath(path)) {
        return Optional.empty();
      }
      return Optional.of(getter.apply(path));
    }
docs: Optionally get a configuration value.