Nil check on date comparison