check calling context for each rule type