(a) A policy of group life insurance or the proceeds thereof payable to the individual insured or to the beneficiary thereunder, shall not be liable, either before or after payment, to be applied by any legal or equitable process to pay any liability of any person having a right under the policy.
(b) This section shall not apply to group life insurance issued to a creditor covering his debtors, to the extent that such proceeds are applied to payment of the obligation for the purpose for which the insurance was so issued.