Taking account of the possibility of null values