error handling when date is not set