deal with null values after midnight