add extra check for dateTime (#25775)