(a) In all cases of mutual debts or mutual credits between the insurer and another person in connection with any action or proceeding under this chapter, such credits and debts shall be set off and the balance only shall be allowed or paid, except as provided in subsection (b) of this section.
(b) No offset shall be allowed in favor of any such person where:
(1) The obligation of the insurer to such person would not at the date of the entry of any liquidation order or otherwise, as provided in Section 27-32-26, entitle him to share as a claimant in the assets of the insurer;
(2) The obligation of the insurer to such person was purchased by, or transferred to, such person with a view of its being used as an offset; or
(3) The obligation of such person is to pay an assessment levied against the members of a mutual insurer or against the subscribers of a reciprocal insurer or is to pay a balance upon the subscription to the capital stock of a stock insurer.