Remove redundant null checks