Fix unnecessary null value removal