before_notify_hook needs a default lambda
more robust check before calling before notify hook
tweak before notify hook spec