In php, ($myvariable==0) When $myvariable is zero, the value of the expression is true; when $myvariable is null, the value of this expression is also true. How
($myvariable==0)
For my case i found this soulution and it works for me :
if ($myvariable === NULL) { codehere... }