Trivial refactoring of the function mongodb.user_roles_exists