if (0 == NULL)

is the same as

if (0 == 0)

and always true in any language. Try it.