ensure null treated as zero