Correctly check existence of date