Fix typo in null check