docs: @Pure
  	@SuppressWarnings({"checkstyle:npathcomplexity", "checkstyle:cyclomaticcomplexity", "checkstyle:returncount"})
  	public static boolean isInstance(Class<?> type, Object obj) {
  		assert type != null;
  		if (obj == null) {
  			return false;
  		}
  
  		// Test according to the Class's behaviour
  		if (type.isInstance(obj)) {
  			return true;
  		}
  
  		// Test according to autoboxing
  		if (type.isPrimitive() && type != Void.class && type != void.class) {
  
  			if (type == Boolean.class) {
  				return boolean.class.isInstance(obj);
  			}
  			if (type == boolean.class) {
  				return Boolean.class.isInstance(obj);
  			}
  
  			if (type == Character.class) {
  				return char.class.isInstance(obj);
  			}
  			if (type == char.class) {
  				return Character.class.isInstance(obj);
  			}
  
  			if (type == Byte.class) {
  				return byte.class.isInstance(obj);
  			}
  			if (type == byte.class) {
  				return Byte.class.isInstance(obj);
  			}
  
  			if (type == Short.class) {
  				return short.class.isInstance(obj);
  			}
  			if (type == short.class) {
  				return Short.class.isInstance(obj);
  			}
  
  			if (type == Integer.class) {
  				return int.class.isInstance(obj);
  			}
  			if (type == int.class) {
  				return Integer.class.isInstance(obj);
  			}
  
  			if (type == Long.class) {
  				return long.class.isInstance(obj);
  			}
  			if (type == long.class) {
  				return Long.class.isInstance(obj);
  			}
  
  			if (type == Float.class) {
  				return float.class.isInstance(obj);
  			}
  			if (type == float.class) {
  				return Float.class.isInstance(obj);
  			}
  
  			if (type == Double.class) {
  				return double.class.isInstance(obj);
  			}
  			if (type == double.class) {
  				return Double.class.isInstance(obj);
  			}
  
  			if (type == Void.class) {
  				return void.class.isInstance(obj);
  			}
  			if (type == void.class) {
  				return Void.class.isInstance(obj);
  			}
  
  			assert false : AssertMessages.unsupportedPrimitiveType();
  		}
  
  		return false;
  	}