that is because `null` is a constant. if you do have a variable that happens to be null it is ok. try 

    php -r '$x = null; if (! $x instanceof \DateTime) {echo "that\n";}'