The failure of a foreign corporation to obtain a certificate of authority to transact business in this state does not impair the validity of a contract or act of the corporation, and does not prevent the corporation from defending an action, suit, or proceeding in a court of this state.