Use "!exp" instead of "exp == NULL" in if condition.