Removed some redundant null checks.