public function hasRole($role)
    {
        if ($role instanceof RoleInterface) {
            $role = $role->getName();
        }

        if (!is_string($role)) {
            throw new InvalidArgumentException(
                'Role argument must be string or an object implemented "Rad\Authorization\Rbac\RoleInterface".'
            );
        }

        return isset($this->roles[$role]);
    }