Good Discussion on IF...ELSE and Nulls.
I have to agree with Sean.
The IF isn't TRUE therefore execute the ELSE. This is what happened so no problem.
The Variable had no Value therefore it wasn't 1 therefore the IF condition wasn't met. Therefore use the ELSE.
Regards
David