public static <T> T getOptionValueOrDefault(
      final CommandLine commandLine,
      final String optionName,
      final CommandLine.ITypeConverter<T> converter) {

    return commandLine
        .getParseResult()
        .matchedOptionValue(optionName, getDefaultOptionValue(commandLine, optionName, converter));
  }
Retrieves the value of a specified command line option, converting it to its appropriate type,
or returns the default value if the option was not specified.

@param <T> The type of the option value.
@param commandLine The {@link CommandLine} instance containing the parsed command line options.
@param optionName The name of the option whose value is to be retrieved.
@param converter A converter that converts the option's string value to its appropriate type.
@return The value of the specified option converted to its type, or the default value if the
    option was not specified. Returns {@code null} if the option does not exist or if there is
    no default value and the option was not specified.
app/src/main/java/org/hyperledger/besu/cli/util/CommandLineUtils.java