code: public static Class<?> toNonPrimitiveClass(Class<?> clazz) {
          if (clazz.isPrimitive()) {
              Class<?> primitiveClazz = MethodUtils.getPrimitiveWrapper(clazz);
              // the above method returns
              if (primitiveClazz != null) {
                  return primitiveClazz;
              } else {
                  return clazz;
              }
          } else {
              return clazz;
          }
      }
docs: Find a non primitive representation for given primitive class.
  
  @param clazz the class to find a representation for, not null
  @return the original class if it not a primitive. Otherwise the wrapper class. Not null