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)
Use the php function is_null( ) function along with the === operator. !== also works the way you'd expect.
===
!==