if($your_variable === NULL) { // do your Logic }
How to Check Whether a Variable is NULL in PHP?
check for null php