Removed unnecessary null checks