lib: simple: add missing NULL check
There is only a need to listen to the cancellation signal when there is a cancellable that can be cancelled in the first place.
The signal handler connection throws a critical otherwise.
Link: !183 (comment 2550663)