added check to avoid errors if user tries to make invite without having any contacts, or doesnt select a contact