debug: replace NULL checking of handlers by default handler

Signed-off-by: Viller Hsiao <villerhsiao@gmail.com>