fixing nil reference in invitations_controller.rb