Not that it makes a lot of difference, but you could have simply used !%var instead of (%var == 0) || (%var == $null)

-genius_at_work