The failure of a foreign corporation to obtain a certificate of authority to do or engage in any business in this state shall not impair the validity of any contract or act of such corporation, and shall not prevent such corporation from defending any action, suit or proceeding in any court of this state.
SDCL 47-27-13