Remove unnecessary null checks