code: public static boolean isNull( Object obj ) {
        if( obj instanceof JSONObject ){
           return ((JSONObject) obj).isNullObject();
        }
        return JSONNull.getInstance()
              .equals( obj );
     }
docs: Tests if the obj is a javaScript null.