docs: @Nullable
    private static Object valueOf(String value, Class<?> cls) {
      if (cls == Boolean.TYPE) {
        return Boolean.valueOf(value);
      }
      if (cls == Character.TYPE) {
        return value.length() >= 1 ? value.charAt(0) : defaultValue(char.class);
      }
      if (cls == Byte.TYPE) {
        return Byte.valueOf(value);
      }
      if (cls == Short.TYPE) {
        return Short.valueOf(value);
      }
      if (cls == Integer.TYPE) {
        return Integer.valueOf(value);
      }
      if (cls == Long.TYPE) {
        return Long.valueOf(value);
      }
      if (cls == Float.TYPE) {
        return Float.valueOf(value);
      }
      if (cls == Double.TYPE) {
        return Double.valueOf(value);
      }
      return null;
    }