Maybe we could check type instead of converting : 
```php
if (!is_string($permission) && !$permission instanceof PermissionInterface) {
    throw new \InvalidArgumentException("permission should be a string or a PermissionInterface");
}
```