code: static Class<?> getTypeAsPrimitiveIfWrapped(Object object) {
          if (object != null) {
              final Class<?> firstArgumentType = getType(object);
              final Class<?> firstArgumentTypeAsPrimitive = PrimitiveWrapper.hasPrimitiveCounterPart(firstArgumentType) ? PrimitiveWrapper
                                                                                                                                  .getPrimitiveFromWrapperType(firstArgumentType) : firstArgumentType;
              return firstArgumentTypeAsPrimitive;
          }
          return null;
      }
docs: Get the type of an object and convert it to primitive if the type has a
  primitive counter-part. E.g. if object is an instance of
  {@code java.lang.Integer} this method will return
  {@code int.class}.
  
  @param object The object whose type to get.
  @return the type as primitive if wrapped