catch date errors