code: public static boolean isValidType(Class clazz)
      {
          if (null == clazz) throw new IllegalArgumentException();
  
          if (String.class  == clazz) return true;
          if (Boolean.class == clazz) return true;
          if (JSONObject.class.isAssignableFrom(clazz)) return true;
          if (JSONArray.class == clazz) return true;
          if (Number.class.isAssignableFrom(clazz)) return true;
  
          return false;
      }
docs: Return whether the class is a valid type of value for a property.
  @param clazz The class type to check for validity as a JSON object type.