T-SQL : Incorrect comparison with NULL