I used 
 
if ($var(x) != null) { ... } 

in one of the routes, and tried to run Kamailio server.
The server exited with an error. I did not know why. 

Once I changed it to if ($var(x) != $null) {} the error went away. 
I missed $ infront null. I think it is hard to trace such problems once a large chunk 
of logic is written since many of us come from C++ and scripting background where $null 
is not a common practice.

Also if I tried to use if (!$var(x)) { ... } Kamailio tries to convert the value of $var(x) to integer.
prints WARNINGS in the log when the $var(x) consists of a string.

Krish Kura