(a) All property protected by valid charter or contract exemption shall be exempt from taxation.
(b) This title shall not be so construed, and shall not so operate, as to exonerate and release from taxation any company or corporation whose charter exempts stock and shares thereof from taxation; but it is enacted that in all cases where such stock is exempted, such company or corporation shall be assessed in such way as may be lawful; and in all cases in which, by the terms or legal effect of the charter, the shares of stock in any corporation are wholly or partially exempt from taxation, or in which a rate of taxation on the shares of the stock is fixed and prescribed, and declared to be in lieu of all other taxes for state, county, and municipal purposes, there shall be assessed and levied a tax, at a rate uniform with the rate levied upon other taxable property, upon the capital stock of such corporation, the value of which capital stock shall be fixed and returned to the assessor as being equal to the aggregate and not less than the actual cash value of all shares of stock in such corporation, including the net surplus; provided, that, where the state has provided in the charter of any such corporation or company that it shall pay a stated percent on each share of stock subscribed annually to the state, which shall be in lieu of all other taxes, it shall be entitled annually to a credit therefor, upon its assessment of its capital stock as provided in this section. This subsection (b) shall not apply so as to prescribe that the capital stock of any such company or corporation shall be assessed and taxes collected upon such assessment for municipal purposes, when the supreme court has, in a suit for the collection of such taxes, adjudged that the capital stock of a corporation was exempt from the payment of them by virtue of its charter.