fix error message when comparing a nil end date