consolidate side effect checking code