check object context in hook