Optimized null checks