Removed a redundant null pointer check.