more defensive date checking