Rework NULL check