Please use === 

comparisons of 0/null/false are always a bit tricky with == only