func firstAction <T> (ofType: T.Type) -> T? {
        return actions.compactMap { $0 as? T }.first
    }