code: @Override
    public T decode(final String s) {
      checkNotNull(s);
      try {
        return Enum.valueOf(type, s);
      } catch (final IllegalArgumentException ignored) {
      }
      try {
        return Enum.valueOf(type, s.toUpperCase());
      } catch (final IllegalArgumentException ignored) {
      }
      try {
        return Enum.valueOf(type, s.toLowerCase());
      } catch (final IllegalArgumentException ignored) {
      }
  
      throw new ConversionException(
          "Unable to instantiate a " + type + " from value " + s + ". Valid values: " + Joiner
              .on(", ").join(EnumSet.allOf(type)));
    }
docs: Converts a string to a value of the enum type. If the string cannot be converted to an enum
  value as-is, conversion is attempted on the string in uppercase and then in lowercase as a
  fallback.
  
  @param s the string to convert
  @return an enum value
  @throws NullPointerException if {@code s} is null
  @throws ConversionException  if {@code s} cannot be converted to an enum value after attempting
  fallback transformations