fix empty date and date comparisons

this shouldn't be necessary