Allow hasRole to accept object, id or name