Fixing the IS NOT NULL condition