code: public static <E> E checkNotInstanceOf(Class type, E object, String errorMessage) {
          isNotNull(type, "type");
          if (type.isInstance(object)) {
              throw new IllegalArgumentException(errorMessage);
          }
          return object;
      }
docs: Tests the supplied object to see if it is not a type of the supplied class.
  
  @param type         the type that is not of the supplied class.
  @param object       the object tested against the type.
  @param errorMessage the errorMessage
  @return the object argument.
  @throws java.lang.IllegalArgumentException if the object is an instance of the type that is not of the expected class.