code: public static boolean isInstance(final Object value, final Type type) {
          if (type == null) {
              return false;
          }
  
          return value == null ? !(type instanceof Class<?>) || !((Class<?>) type).isPrimitive()
                  : isAssignable(value.getClass(), type, null);
      }
docs: <p>Checks if the given value can be assigned to the target type
  following the Java generics rules.</p>
  
  @param value the value to be checked
  @param type the target type
  @return {@code true} if {@code value} is an instance of {@code type}.