private void addOptionIfPresent(List<OptionElement> options, String name, boolean hasOption, Object value) {
        if (hasOption) {
            OptionElement.Kind kind;
            if (value instanceof Boolean) {
                kind = OptionElement.Kind.BOOLEAN;
            } else if (value instanceof String) {
                kind = OptionElement.Kind.STRING;
            } else if (value instanceof Enum) {
                kind = OptionElement.Kind.ENUM;
            } else {
                kind = OptionElement.Kind.STRING;
            }
            options.add(new OptionElement(name, kind, value.toString(), false));
        }
    }
Adds an option to the options list if it is present in the source.
Determines the appropriate OptionElement.Kind based on the value type.

@param options   The list of options to add to
@param name      The name of the option
@param hasOption Whether the option is present
@param value     The value of the option
core/src/main/java/kafka/automq/table/deserializer/proto/parse/converter/FileDescriptorConverter.java