Handle NULL dates correctly.