add missing null check
Merge pull request #2189 from WalterBright/fix_null_expression

Fix null expression