private static boolean isOptionSet(final CommandLine.Model.OptionSpec option) {
    final CommandLine commandLine = option.command().commandLine();
    try {
      return !option.stringValues().isEmpty()
          || !Strings.isNullOrEmpty(commandLine.getDefaultValueProvider().defaultValue(option));
    } catch (final Exception e) {
      return false;
    }
  }
There are different ways to format an option value back to its CLI form, the first is to use a
{@link TypeFormatter} if present, otherwise the formatting it is delegated to {@link
OptionParser#format(Object)}

@param optConverter the list of converter types for the option
@param optVal the value of the options
@return a string with the CLI form of the value
app/src/main/java/org/hyperledger/besu/cli/util/CommandLineUtils.java