Simplify detection of cancellable action