Fix a null check
Merge pull request #3628 from lioncash/master

Fix a null check