Remove duplicate null checks