Modified datetime check to not pass for empty date.