Check return values.

Otherwise your handler might not be registered and you'll never find
out.