check if the role exists before getting the permissions in it