try { boolean match = null instanceof Object; System.out.println("null instanceof Object == " + match); } catch (Throwable t) { System.err.println( "OK, I admit I was wrong, null instanceof Object throws " + t); }