Plaintiff instituted suit against defendant seeking damages for breach of contract. Plaintiff also alleged that defendant was not a registered corporation in the State of Michigan and thus had no right to conduct business therein. Defendant answered, admitting that it was not a registered corporation but denying any breach of contract.
Defendant filed a motion for summary judgment pursuant to GCR 1963, 117.2(1), alleging that plaintiff failed to state a claim upon which relief could be granted. Defendant argued in support of its motion that since plaintiff, in a previous equitable action against defendant, had taken the position that the contract in question was void ab initio, this position was a judicial admission and therefore the action on the contract could not be maintained.
The trial court granted the motion and in its opinion held that the inconsistent positions advanced by plaintiff barred it from any relief in its action on the contract. Plaintiff appeals and we reverse.
The contract in question concerned the construction and development of nursing homes in the State of Michigan. Defendant advanced funds and a mortgage was executed between the parties, plaintiff-mortgagor and defendant-mortgagee. Subsequent to institution of the instant action for breach of contract, defendant commenced a foreclosure action on the mortgage. Responding, plaintiff instituted a separate action in the circuit court seeking equitable relief in the form of an injunction. Plaintiff prayed that the mortgage contract be declared void ab initio and that defendant be *128permanently enjoined from foreclosure on the grounds that defendant was an unregistered foreign corporation doing business in Michigan. Defendant opposed the prayer for relief but the circuit court entered judgment for plaintiff and granted the injunction.
On appeal, in an unpublished per curiam opinion dated June 22, 1973, Docket No. 15683, this Court reversed the lower court’s judgment permanently enjoining defendant. We held that plaintiff’s failure to tender the amount of the mortgage debt due was, in effect, failure to do equity and precluded plaintiff from obtaining equitable relief. Pursuant to this Court’s decision, the equitable claim was dismissed, the foreclosure proceedings were reinstituted and plaintiff’s equity of redemption was foreclosed.
GCR 1963, 117.2(1) provides that a party may move for summary judgment if the opposing party has failed to state a claim upon which relief can be granted. A motion based on GCR 1963, 117.2(1) is to be tested exclusively on the pleadings. Interrogatories and depositions are only relevant if the motion for summary judgment alleges that there is no genuine issue of fact. Todd v Biglow, 51 Mich App 346; 214 NW2d 733 (1974). In examining whether the pleadings are sufficient to state a claim, the trial court must accept as true all well-pleaded facts contained in the pleadings, Sanders v Clark Oil, 57 Mich App 687; 226 NW2d 695 (1975), and should also consider any conclusions which can reasonably be drawn from the factual allegations. Van Liere v State Highway Department, 59 Mich App 133; 229 NW2d 369 (1975). In deciding whether a motion brought pursuant to GCR 1963, 117.2(1) should be granted, the trial court should not consider whether the plaintiff has asserted a *129meritorious claim, but should only consider whether a claim has been legally pled. Szydlowski v General Motors, 59 Mich App 180; 229 NW2d 365 (1975), lv granted, 394 Mich 782 (1975).
In the instant case, plaintiffs complaint alleged the existence of a contract, a breach of that contract by defendant and damages suffered as a result of the breach. Thus, it was error to grant defendant’s motion for summary judgment under GCR 1963, 117.2(1), see Borman’s, Inc v Lake State Development Co, 60 Mich App 175; 230 NW2d 363 (1975), when the trial court considered pleadings involved in the equitable action brought by plaintiff in response to defendant’s mortgage foreclosure. See Chatham Super Markets, Inc v Ajax Asphalt Paving, Inc, 370 Mich 334, 339; 121 NW2d 836 (1963), Todd v Biglow, supra.
Since the trial court, in effect, ruled that plaintiff was estopped from bringing its action for breach of contract because of the position plaintiff had taken in the equitable action seeking to enjoin defendant’s foreclosure of the mortgage and because this matter is being remanded for trial, it is necessary for us to address ourselves to the issue of estoppel. The trial court, in granting summary judgment, appears to have treated the pleadings in the equitable action, i.e. that the mortgage contract was void ab initio since defendant was an unregistered foreign corporation, as a judicial admission. A statement is a judicial admission only if it is a statement made by a party or his attorney during the course of trial, and is a distinct, formal, solemn admission which is made for the express purpose of dispensing with formal proof of that particular fact at a trial. Ortega v Lenderink, 382 Mich 218, 169 NW2d 470 (1969). Although statements of fact in other pleadings are inconclusively *130admissible, see Guarantee Bond & Mortgage Co v Hilding 246 Mich 334; 224 NW 643 (1929), they cannot be used for the purpose of establishing the defense of estoppel. See Ledger v Northwestern Mutual Life Ins Co, 258 Mich 26; 241 NW 803 (1932). Furthermore, the statement in question was not a statement of fact but a conclusion of law and an admission by an attorney as to a point of law is not binding on a court, Bradway v Miller, 200 Mich 648; 167 NW 15 (1918), nor can it be used for the purpose of establishing the defense of estoppel. Thayer v Arnold, 32 Mich 336 (1875).
The trial court’s reliance on the case of Hassberger v General Builders Supply Co, 213 Mich 489; 182 NW 27 (1921), is misplaced. In Hassberger, plaintiff-purchaser brought an action against defendant-seller, seeking specific performance of an alleged contract to purchase realty. Defendant answered and asserted that it was not bound by the option because the option was unenforceable and void. Plaintiffs counsel conceded that defendant’s position was well-taken, dismissed the complaint and subsequently brought another action seeking to recover the amount of money that plaintiff had previously paid to defendant on the alleged option to purchase the property. In answer to this complaint, defendant attempted to alter its previous position and asserted that the option was enforceable, that plaintiff was bound by its terms and that it (the defendant) was ready and willing to perform its portion of the contract. The trial court held that defendant was estopped from asserting that the option was still enforceable and on appeal the Michigan Supreme Court affirmed. The Court reasoned that since defendant had succeeded in defeating the original action brought by plaintiff for specific performance on the basis that there *131was no valid contract existing between it and plaintiff, defendant could not change positions and assert that the option was valid in order to defeat the plaintiff’s claim for restitution. The key factor the trial court in our case appears to have overlooked is that the defendant in Hassberger was successful in defeating the first action.
We submit that the position taken by defendant in the instant case, rather than plaintiff, is closer to that taken by defendant in the Hassberger case. Defendant in the present case asserted that the contract between it and plaintiff was valid and after successfully foreclosing on the mortgage, it then asserted that plaintiff could not recover on the principal contract because of plaintiff’s previous position that the mortgage contract was null and void. Plaintiff only alleged that the mortgage contract, made by defendant within the State of Michigan, was void ab initio. As we read the record, this would appear to be separate from the contract which seems to have been made in California and sued on by plaintiff in the principal action. Regardless, defendant, having been the party to prevail in the equitable action brought by plaintiff, should not now be heard to assert that the contract is unenforceable because of the plaintiff’s previous position. A party’s mistake as to its legal rights does not estop it from enforcing such a right under a different theory. Binder v Wlaskolin, 234 Mich 672; 209 NW 82 (1926).
In Lake States Engineering Corp v Lawrence Seaway Corp, 15 Mich App 637; 167 NW2d 320 (1969), plaintiff brought an action against Lawrence Seaway, alleging a breach of contract. In defense of plaintiff’s complaint, Lawrence Seaway asserted that the contract entered into between the plaintiff and Lawrence Seaway was not en*132forceable against it (Lawrence Seaway) because plaintiff was an unregistered foreign corporation doing business in Michigan. Lawrence Seaway also counterclaimed against the plaintiff, alleging a breach of the same contract. On appeal, this Court held that the contract was not enforceable by plaintiff, an unregistered foreign corporation doing business in the State of Michigan, but that Lawrence Seaway could maintain the action against the plaintiff.
"Allowing anyone who deals with an unqualified foreign corporation to avail itself of the bar to suits by such corporation serves the public as a whole by providing a most efficient deterent to avoidance of state taxation and regulation of foreign corporations.” 15 Mich App at 655.
If a defendant is allowed to assert that a contract is not enforceable against it because the complaining party is an unregistered foreign corporation, it would be inconsistent to preclude that same defendant from counterclaiming or bringing another action arising out of the contract against the unregistered corporation. To do so would enable an unregistered foreign corporation to protect itself by what is intended as a sanction against it.
Reversed and remanded for trial of plaintiff’s claim for breach of contract. Costs to plaintiff-appellant.