Removed unnecessary null checks.