Ensure that the sqlite date part/trunc fields can handle NULL values.