Remove unnecessary null check