test if cb exists

Signed-off-by: Clark Wang <clark.wangs@gmail.com>