
346 S.W.3d 313 (2011)
James EVANS, et al., Appellants,
v.
EMPIRE DISTRICT ELECTRIC COMPANY, et al., Respondents.
No. WD 73376.
Missouri Court of Appeals, Western District.
May 31, 2011.
Motion for Rehearing and/or Transfer to Supreme Court Denied July 5, 2011.
Application for Transfer Denied August 30, 2011.
*314 Henry B. Robertson, St. Louis, MO, for appellants.
Diana C. Carter, Jefferson City, MO for respondent Empire District Electric Company.
James R. Layton, Jefferson City, MO, for respondent Missouri Public Service Commission.
Before Division One: GARY D. WITT, Presiding Judge, JAMES E. WELSH, Judge and ALOK AHUJA, Judge.
GARY D. WITT, Judge.
James Evans, Kelly Cardin, and Power Source Solar appeal the trial court's Final Judgment of Dismissal of their claims against Empire District Electric Company and the Missouri Public Service Commission. We affirm.

Factual Background
James Evans, Kelly Cardin, and Power Source Solar ("Appellants") filed suit against Empire District Electric Company ("Empire") and the Missouri Public Service Commission ("PSC") seeking a declaratory judgment that section 393.1050[1] (the Renewable Energy Standard) is invalid. To understand that statute and the Appellants' claim below, we must first provide a cursory explanation of adoption and the subsequent statutory scheme for the Renewable Energy Standard. At the General Election on November 4, 2008, Missouri voters approved an initiative petition designated Proposition C, ("Proposition C") which established by statute a "Renewable *315 Energy Standard" for utility companies operating in Missouri. The statutory scheme mandates certain levels of energy production from renewable resources and provides incentives for compliance and penalties for noncompliance for utility companies operating in Missouri. See sections 393.1020-393.1035. Section 393.1050, the statute being challenged, was not contained in Proposition C, and is an exemption from certain aspects of the statutory scheme (established by Proposition C) for utility companies that meet certain renewable energy standards. Section 393.1050 was passed by the Missouri General Assembly on May 16, 2008, and was signed by the Governor and became effective on August 28, 2008, three months prior to the adoption of Proposition C by Missouri voters.
Appellants sought the same reliefa declaratory judgment that section 393.1050 is invalidon three theories. First, they argued the General Assembly lacked authority to amend Missouri's Renewable Energy Standard by enacting section 393.1050 before Proposition C, which established Missouri's Renewable Energy Standard, had been passed by Missouri voters. Second, they argued section 393.1050 was in irreconcilable conflict with Proposition C, and, as Proposition C was the later-enacted law, section 393.1050 was repealed by implication. Third, they argued that section 393.1050 only applied to Empire and no other electrical company and there was no rational basis for exempting Empire but no other electrical corporation from the requirements of Missouri's Renewable Energy Standard and, therefore, section 393.1050 was an unconstitutional special law.
Both Empire and PSC filed motions to dismiss. The trial court agreed with Empire that Appellants were first required to address their complaints concerning the statute before the PSC which has "primary jurisdiction" over Empire and the application of section 393.1050.

Standard of Review
"The standard of review for a trial court's grant of a motion to dismiss is de novo." Lynch v. Lynch, 260 S.W.3d 834, 836 (Mo. banc 2008). "When this Court reviews the dismissal of a petition for failure to state a claim, the facts contained in the petition are treated as true and they are construed liberally in favor of the plaintiffs." Id.

Adams v. One Park Place Investors, LLC, 315 S.W.3d 742, 753 (Mo.App. W.D.2010).

Analysis[2]
The trial court granted Empire and the PSC's motions to dismiss because it found that the PSC had "primary jurisdiction" over the case. This court has described the doctrine of "primary jurisdiction" in this way:

*316 Under the doctrine of primary jurisdiction, a court will not decide a controversy involving a question within the jurisdiction of an administrative tribunal until after the tribunal has rendered its decision "(1) where administrative knowledge and expertise are demanded; (2) to determine technical, intricate fact questions; [and] (3) where uniformity is important to the regulatory scheme." Killian v. J & J Installers, Inc., 802 S.W.2d 158, 160 (Mo. banc 1991). The doctrine of exhaustion of remedies is a jurisdictional requirement that all remedies be exhausted at the administrative level before applying to the courts for relief. Pettigrew v. Hayes, 196 S.W.3d 53, 56 (Mo.App. W.D.2005) (citing Green v. City of St. Louis, 870 S.W.2d 794, 796 (Mo. banc 1994)). "If all administrative remedies have not been exhausted, the circuit court lacks subject matter jurisdiction to judicially review the administrative decision."
Oanh Thile Huynh v. King, 269 S.W.3d 540, 543-44 (Mo.App. W.D.2008). However, in light of the Missouri Supreme Court's holdings in J.C.W. ex rel. Webb v. Wyciskalla, 275 S.W.3d 249 (Mo. banc 2009) and McCracken v. Wal-Mart Stores East, LP, 298 S.W.3d 473 (Mo. banc 2009), a re-examination of the concept of "primary jurisdiction" is in order.
In Webb the Missouri Supreme Court made clear that there are only two types of jurisdiction: personal and subject matter. Webb, 275 S.W.3d at 252. "[T]he subject matter jurisdiction of Missouri's courts is governed directly by the state's constitution. Article V, section 14 sets forth the subject matter jurisdiction of Missouri's circuit courts in plenary terms, providing that `[t]he circuit courts shall have original jurisdiction over all cases and matters, civil and criminal.'" Id. at 253. Insofar as prior cases have held that the failure to exhaust administrative remedies is a question of subject matter jurisdiction, those cases have been overruled by the Supreme Court. "When a statute speaks in jurisdictional terms or can be read in such terms, it is proper to read it as merely setting statutory limits on remedies or elements of claims for relief that courts may grant." Id. at 255. Therefore, the concept of "primary jurisdiction" is really a question of whether the trial court has a statutory right to proceed. See Coleman v. Missouri Sec'y of State, 313 S.W.3d 148, 154 (Mo.App. W.D.2010).
The distinction between whether the circuit court has subject matter jurisdiction or the statutory authority to proceed is more than a semantic one. McCracken, 298 S.W.3d at 477. Subject matter jurisdiction cannot be waived and can be addressed for the first time during trial or on appeal. Id. (citing Gunn v. Dir. of Revenue, 876 S.W.2d 42, 43 (Mo.App. E.D.1994)). Other non-jurisdictional defenses are matters of trial error and are waived if not raised in a responsive pleading or otherwise under Missouri law. See id. at 476 ("[I]f a matter is not jurisdictional but rather is a procedural matter required by statute or rule or an affirmative defense of the sort listed in Rule 55.08, then it generally may be waived if not raised timely.") (Emphasis added).[3] This *317 issue was timely raised in the case before us and there is no argument that this issue has been waived.
The PSC has been given the authority, per statute, over regulated entities in the first instance. Accordingly, the issue of whether the circuit court has the statutory authority to proceed before the matter is brought before the PSC "should be raised as an affirmative defense to the circuit court's statutory authority to proceed with resolving his claim." Treaster v. Betts, 324 S.W.3d 487, 490 (Mo.App. W.D. 2010) (quoting McCracken, 298 S.W.3d at 476-77). Affirmative defenses "must be pleaded and proved as provided in Rules 55.08 and 55.27. It is not a defense that may be raised in a motion to dismiss." Id. (quoting McCracken, 298 S.W.3d at 479). "A pre-trial dismissal based on an affirmative defense must be granted under the standards of summary judgment." Id. (citing Fortenberry v. Buck, 307 S.W.3d 676, 679 (Mo.App. W.D.2010)). An exception exists, however, whereby a defendant may properly file a motion to dismiss for failure to state a claim under Rule 55.27(a)(6)[4] when it appears from the face of the petition that an affirmative defense is applicable. Fortenberry, 307 S.W.3d at 679 n. 2. This is the case at bar. The trial court granted Empire's motion to dismiss based on the affirmative defense that the PSC had "primary jurisdiction" over Empire and the application thereto of section 393.1050.
In Point One, the Appellants argue that the trial court erred in granting Empire's motion to dismiss their Petition[5] because Appellants have no adequate remedy to exhaust before the PSC in that agency remedies need not be exhausted where the validity of a statute is in issue, and a complaint before the PSC would not be an adequate remedy since the PSC has no jurisdiction to declare a statute invalid, as it would have to do before compelling Empire to file a solar rebate tariff.
Generally, a litigant must exhaust his available administrative remedies before a court will assume jurisdiction (now authority over an action). Premium Standard Farms, Inc. v. Lincoln Tp. of Putnam Cnty., 946 S.W.2d 234, 237 (Mo. banc 1997). "Our Supreme Court has determined that the regulation and fixing of rates or charges for public utilities, and the classification of the users or consumers to whom the rates are chargeable is the function of the [PSC]." Inter-City Beverage Co., Inc. v. Kansas City Power & Light Co., 889 S.W.2d 875, 877 (Mo.App. W.D.1994) (citing State ex rel. Kansas City *318 Power & Light Co. v. Buzard, 350 Mo. 763, 168 S.W.2d 1044, 1046 (Mo. banc 1943)).
Chapters 386 and 393 [...] set forth the scheme by which the [PSC] is granted the exclusive jurisdiction to determine, in the first instance, the interpretation of the lawful rate applicable to the service provided to the customer. See also, DeMaranville v. Fee Fee Trunk Sewer, Inc., 573 S.W.2d 674 (Mo.App.1978), in which the court held that the first step to obtaining a decision must be before the [PSC]. [T]he [PSC] makes its decision regarding the rates and classification. Matters within the jurisdiction of the [PSC] must first be determined by it in every instance before the courts have jurisdiction to make judgments in the controversy.
Id. at 878. There can be no question that the PSC has authority to review the provisions of section 393.1050 and its application to Empire. The application of Section 393.1050 raises factual issues as to whether Empire meets the renewable energy standards specified in that section, and whether Appellants would otherwise be entitled to the benefits they claim from Empire under Proposition C. Further, if Empire is subject to the provision of Proposition C from which section 393.1050 arguably would exempt it, it would be required to file tariffs with the PSC to implement the relevant Proposition C requirements. The present dispute is whether a challenge to a statute, which purports to exempt certain utility companies from providing a rebate to customers who install solar electric systems is in irreconcilable conflict with the provision of a statute adopted by an initiative petition (Proposition C), is a matter which must be considered first by the PSC.
The Appellants' argument that they have no remedy to exhaust before the PSC because the PSC cannot declare a statute invalid has no merit, is belied by the claims in their petition. The PSC has been given the statutory authority to interpret statutes pursuant to the administration of their charge; the PSC's interpretation is afforded great weight by Missouri courts. See State ex rel. Sprint Missouri, Inc. v. Pub. Serv. Comm'n of Missouri, 165 S.W.3d 160, 164 (Mo. banc 2005) (citing Foremost-McKesson, Inc. v. Davis, 488 S.W.2d 193, 197 (Mo. banc 1972)). Appellants are correct that the PSC has no authority to declare a statute invalid or interpret a statute in such a way that is contrary to the plain terms of the statute. State ex rel. Springfield Warehouse & Transfer Co. v. Pub. Serv. Comm'n, 240 Mo.App. 1147, 225 S.W.2d 792, 794 (Mo.App.1949). This is because the PSC only has the power granted to it by the Legislature and may only act in a manner directed by the Legislature or otherwise authorized by necessary or reasonable implication. Id.
However, when the PSC is confronted with a new or amended statute, it must take that statute and interpret its meaning and application to the facts at hand. In other words, the PSC must construe the statute in light of the entire statutory scheme. Appellants argue in Count II of their Amended Petition that section 393.1050 was repealed by implication because it is in irreconcilable conflict with Proposition C, and, since Proposition C was passed later in time, it prevails. We do not express an opinion as to the merits of this claim; however, such a claim is based on a general rule of statutory construction that statutes are to be harmonized if possible, but, if they are inconsistent, a statute is impliedly repealed by a later one which revises the subject matter of the first. See Gregory v. Kansas City, 244 Mo. 523, 149 S.W. 466, 470 (Mo. banc 1912); see also Knight v. Carnahan, 282 S.W.3d 9, 19 (Mo.App. W.D.2009) (quoting BLACK'S LAW DICTIONARY 1299 (6th ed. 1990)) ("Repeal means:[t]he abrogation or *319 annulling of a previously existing law by the enactment of a subsequent statute [... ] which contains provisions so contrary to or irreconcilable with those of the earlier law that only one of the two statutes can stand in force (called `implied' repeal")). Construction of the statutory scheme by the PSC, in accordance with their judgment as to the intent of the Legislature, is the process that is envisioned for the administrative system in Missouri. Contrary to Appellants' assertion, relief may be found in the first instance before the PSC. The PSC has the power to determine if the provisions of Proposition C are in irreconcilable conflict or can in fact be harmonized with the provisions of section 393.1050. Appellants are able to file a complaint with the PSC under 4 C.S.R. § 240-2070 and section 386.390 and the PSC is able to grant relief. The trial court did not err in finding that Appellants failed to exhaust their remedies before the PSC and that, therefore, the PSC has primary statutory authority over the cause.
Point One is denied.
In Point Two, the Appellants argue the trial court abused its discretion in granting the PSC's motion to dismiss because the PSC is an interested party required to be joined under section 527.110, in that Proposition C gives the PSC authority to enforce its provisions through rulemaking, and this gives rise to a justiciable, existing controversy over the PSC's authority to enforce by rule a statute alleged to be invalid, which creates a controversy that is ripe even without a present threat of enforcement.
The Final Judgment of Dismissal dismissed the Petition as to both Empire and PSC for failure to state a claim because there is a "lack of a genuine and present dispute among the parties that is ripe for judicial resolution given the [PSC's] primary jurisdiction and Plaintiffs' failure to seek relief from the [PSC] in the first instance." For the reasons stated in Point One, the trial court did not err in dismissing the Petition as against the PSC on this basis as well.
Point Two is denied.

Conclusion
For the aforementioned reasons, the trial court's Final Judgment of Dismissal of Appellants' claims against Empire District Electric Company and the Missouri Public Service Commission is hereby affirmed.
All concur.
NOTES
[1]  All statutory citations are to RSMo 2000 as updated through the 2010 Cumulative Supplement, unless otherwise indicated.
[2]  "Although neither party has raised the issue, this Court has the duty to address its jurisdiction sua sponte." Mo. Prosecuting Attorneys and Circuit Attorneys Ret. Sys. v. Pemiscot Cnty., 217 S.W.3d 393, 399 (Mo.App. S.D.2007). Article V, section 3 of the Missouri Constitution provides that "[t]he supreme court shall have exclusive appellate jurisdiction in all cases involving the validity... of a statute ... of this state." "The Missouri Supreme Court, however, does not have exclusive jurisdiction, and transfer to that court is not required, where it is not necessary to construe the constitution or determine the constitutionality of a statute to resolve the issues presented on appeal." Whitaker v. City of Springfield, 889 S.W.2d 869, 873 (Mo.App. S.D.1994). Although Appellants have raised issues concerning the constitutional validity of section 393.1050 in this action, none of the parties ask us to resolve those issues in this appeal; instead, this appeal involves only the correctness of the trial court's dismissal of the case on primary jurisdiction grounds, without reaching Appellants' constitutional arguments. In these circumstances, article V, section 3 does not vest exclusive appellate jurisdiction in the Supreme Court.
[3]  The Eastern District of this Court has continued to determine sua sponte whether the trial court has exceeded its statutory right to proceed. See e.g., Linhardt v. Director of Revenue, 320 S.W.3d 202, 204 (Mo.App. E.D. 2010). This is inapposite of our understanding of Webb which made clear that the distinction between errors of jurisdiction and the statutory right to proceed is more than a semantic one. McCracken, 298 S.W.3d at 477. Whether the trial court has the statutory right to proceed is not a matter of subject matter jurisdiction but a matter of trial error that is waived by the parties if an objection is not brought before the trial court. Id. at 476. The Eastern District, in support of its interpretation, cites to Webb, but we can find no support in Webb for the proposition that the appellate courts have the authority sua sponte to confine the trial court to its statutory authority, an issue which can be waived if not raised before the trial court.
[4]  All rule citations are to the Missouri Supreme Court Rules (2010), unless otherwise indicated.
[5]  Appellants filed its Petition and subsequently filed an Amended Petition, without leave of court and while the Respondent's motion to dismiss was pending. The trial court found that the legal analysis on the motion to dismiss was equally applicable to Appellants' Petition and their Amended Petition. Therefore, the trial court refused to rule whether Appellants were required to seek leave to file their Amended Petition and as such a ruling was unnecessary. Neither party challenges this portion of the trial court's Judgment. Therefore, it is unnecessary to determine whether it was Appellants' Petition or Amended Petition that was dismissed by the trial court, as the relevant allegations contained therein are identical between the two Petitions. We will, therefore, refer to the petition that was dismissed by the trial court as "the Petition."
