check if date is nil for advanced search