Check context *before* adding hook.