You should probably check both `RoleEntityInterface` and `RoleInterface`. For `RoleEntityInterface`, you can also call `$role->getParent()`, for `RoleInterface`, you can only call `$role->getRoleId()`