Fix comparisons with optional date field & replace previous fix which would try to store `'0000-00-00'` in the database which is rejected by postgres.
Fix comparisons with optional date field & replace previous fix which would try to store `'0000-00-00'` in the database which is rejected by postgres.