Handler overwrites operator bool, so need to explicitly test for nullptr rather than not having any handlers defined.