private boolean isSupportedEnumValue(Object target) {
        if (target == null) {
            return true;
        }
        Class<?> targetType = target.getClass();
        return targetType.isPrimitive()
                || Boolean.class.isAssignableFrom(targetType)
                || Number.class.isAssignableFrom(targetType)
                || CharSequence.class.isAssignableFrom(targetType)
                || Enum.class.isAssignableFrom(targetType);
    }
Check whether the given object may be included in a "{@link SchemaKeyword#TAG_CONST}"/"{@link SchemaKeyword#TAG_ENUM}" attribute.

@param target object to check
@return whether the given object may be included, otherwise it should be ignored
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/AttributeCollector.java