If an invitation is sent to someone who doesn't have an account, then invitation.sent_to?(nil) returns true. Fixed that.