Strange condition. We're satisfied if token not nil, but if token is nil - checking its length. So what length can be nil-pointer?