
218 P.3d 741 (2009)
ASPHALT SPECIALTIES, CO., INC., Plaintiff-Appellant,
v.
CITY OF COMMERCE CITY, Colorado, and Roger Tinklenberg, in his official capacity as Director of Finance, City of Commerce City, Colorado, Defendants-Appellees.
No. 08CA2120.
Colorado Court of Appeals, Div. III.
September 3, 2009.
*743 Silverstein & Pomerantz, LLP, Neil I. Pomerantz, Robert R. Gunning, Denver, Colorado, for Plaintiff-Appellant.
Murray Dahl Kuechenmeister & Renaud, LLP, Malcolm M. Murray, M. Patrick Wilson, Christopher M. Price, Denver, Colorado, for Defendants-Appellees.
Opinion by Judge TERRY.
In this case, we consider whether a local government that enacts its own avenue for appeal of a sales or use tax assessment under section 29-2-106.1(9), C.R.S.2008, may decline to hold a hearing requested by the taxpayer and issue a decision thereon, thus depriving the taxpayer of the right to appeal. We conclude that where the local government has created its own avenue for appeal that establishes, as a prerequisite to appeal, a final decision rendered after a hearing, the local government may not rely on provisions of section 29-2-106.1(3) or (8), C.R.S.2008, to deprive the taxpayer of a hearing, a decision thereon, and the ultimate right to appeal such decision.
Plaintiff, Asphalt Specialties Co., Inc. (the company), appeals the district court's judgment dismissing its complaint challenging a use tax assessment issued by defendants, City of Commerce City, Colorado and Roger Tinklenberg, in his official capacity as Director of Finance of Commerce City (collectively, the city). We affirm in part, reverse in part, and remand.

I. Facts
The following facts, as alleged in the company's complaint, are deemed true for purposes of our review. See BRW, Inc. v. Dufficy & Sons, Inc., 99 P.3d 66, 72 (Colo.2004) (when reviewing a motion to dismiss, appellate court accepts all matters of material fact in complaint as true and views the allegations in the light most favorable to the plaintiff).
 In 2005, the city initiated a sales and use tax audit of the company's operations for a certain time period.
 On October 12, 2005, the city issued a Notice of Final Determination  Assessment  Demand for Payment in an aggregate amount of $2,189,407.86 in use *744 taxes, interest, and penalties, which the city asserted was due and owing to it.
 The city's assessment was based only on an estimated liability, because it had not had sufficient time in which to complete a detailed audit before the expiration of the applicable statute of limitations on sales and use tax assessments.
 A city auditor advised the company that the city could delay any hearing on the challenged assessment if the company requested that the city first complete its audit activities.
 In accordance with that advice, the company requested that the city continue with its audit before conducting any hearing.
 More than two years later, after completing its audit, the city reduced the company's assessment for use taxes, interest, and penalties to an aggregate amount of $1,068,168.63.
 When the company advised the city that it still wanted a hearing to contest the assessment, a city auditor advised the company that it no longer had any right to a hearing.
 On March 14, 2008, the deputy city manager again informed the company that the city did not intend to hold a hearing, and that, in its view, the company had lost all rights to further appeal.
On April 10, 2008, the company filed a "complaint and notice of appeal" in the district court, requesting that the court either review the merits of the company's protest of the assessment or remand the matter to the city with instructions to conduct a hearing.
The city moved to dismiss the company's complaint and notice of appeal under C.R.C.P. 12(b)(1) and 12(b)(5). It contended the district court lacked subject matter jurisdiction to consider the company's claims (1) that the city's municipal code permitted taxpayers to appeal a hearing decision under section 29-2-106.1(9), and (2) that the city should be ordered to conduct a hearing under C.R.C.P. 106(a)(2) or 106(a)(4). The city also argued that the company's waiver and estoppel claims failed to state a claim for relief. The district court granted the motion without a hearing. In doing so, it reasoned that the company could not:
 appeal under section 29-2-106.1(9) (the state appeal statute), and Commerce City Code of Ordinances section 20-12-1 (2006) (the municipal code), because that right to appeal is triggered by a decision rendered after a hearing, and no hearing had been held;
 obtain mandamus relief under C.R.C.P. 106(a)(2) because, under section 29-2-106.1(8), the company could have sought judicial review when the city failed to hold a hearing and render a final decision within 180 days of the company's request for a hearing; or
 obtain relief under section 29-2-106.1(8) or C.R.C.P. 106(a)(4), because the company did not seek judicial review within 30 days of the expiration of that 180-day period.

II. Analysis

A. Standard of Review
C.R.C.P. 12(b)(1) governs motions to dismiss for lack of subject matter jurisdiction. When the district court determines a jurisdictional issue without an evidentiary hearing and accepts all of the plaintiff's assertions of fact as true, the jurisdictional issue may be determined as a matter of law. Hansen v. Long, 166 P.3d 248, 250-51 (Colo. App.2007).
A C.R.C.P. 12(b)(5) motion to dismiss tests the sufficiency of the complaint. In assessing a C.R.C.P. 12(b)(5) motion, a court must "accept all matters of material fact in the complaint as true and view the allegations in the light most favorable to the plaintiff." Wagner v. Grange Ins. Ass'n, 166 P.3d 304, 306-07 (Colo.App.2007) (quoting BRW, 99 P.3d at 71). A C.R.C.P. 12(b)(5) motion should only be granted when "the plaintiff's factual allegations cannot support a claim as a matter of law." BRW, 99 P.3d at 71.
We review de novo a district court's order dismissing a case as a matter of law and without holding an evidentiary hearing. See State Farm Fire & Cas. Co. v. Weiss, 194 *745 P.3d 1063, 1065 (Colo.App.2008) (reviewing dismissal of claims under C.R.C.P. 12(b)(5)); Hansen v. Long, 166 P.3d 248, 250-51 (Colo. App.2007) (reviewing dismissal of claims under C.R.C.P. 12(b)(1)).
Whether the company has a present right to an appeal or to some form of judicial review of the city's demand for payment turns upon the interpretation of the state appeal statute, section 29-2-106.1, and section 20-12-1 of the municipal code. We review de novo the district court's interpretations of statutes and municipal ordinances. See Sperry v. Field, 205 P.3d 365, 367 (Colo. 2009) ("Statutory interpretation is a question of law subject to de novo review."); Town of Erie v. Eason, 18 P.3d 1271, 1274 (Colo.2001) ("[I]nterpretation of a municipal ordinance involves a question of law. . . . [Such an interpretation] is subject to our de novo review.").
"The same rules of construction apply in the interpretation of ordinances and statutes." Steamboat Springs Rental & Leasing, Inc. v. City & County of Denver, 15 P.3d 785, 787 (Colo.App.2000). Thus, in interpreting statutes and ordinances, our task is to give effect to legislative intent. In doing so, we look first to the language employed. If the meaning of the enactment is clear and unambiguous, we will apply it as written, unless doing so would lead to an absurd result. In re Marriage of Bertsch, 97 P.3d 219, 221 (Colo.App.2004).

B. Statutory Background
The state appeal statute sets forth the possible avenues for appeal of a local government's sales or use tax assessment. § 29-2-106.1, C.R.S.2008. Subsection (3), which is not at issue here, permits a party to appeal to the executive director of the department of revenue. Subsection (8)(b) governs appeals to the district court. It provides:
The taxpayer shall appeal to the district court pursuant to this subsection (8) within thirty days after the taxpayer's exhaustion of local remedies. The taxpayer shall have no right to such hearing if he has not exhausted local remedies or if he fails to request such hearing within the time period provided for in this subsection (8). For purposes of this subsection (8), "exhaustion of local remedies" means:
(I) The taxpayer has timely requested in writing a hearing before the local government, and such local government has held such hearing and issued a final decision thereon. . . . Such hearing shall be held and the final decision thereon issued within ninety days after the local government's receipt of the taxpayer's written request therefor, except the period may be extended if the delay in holding the hearing or issuing the decision thereon was occasioned by the taxpayer, but, in any such event, such hearing shall be held and the decision thereon issued within one hundred eighty days of the taxpayer's request in writing therefor.
(II) The taxpayer has timely requested in writing a hearing before the local government and such local government has failed to hold such hearing or has failed to issue a final decision thereon within the time periods prescribed in subparagraph (I) of this paragraph (b).
§ 29-2-106.1(8)(b).
The appeal statute also allows local governments to establish additional avenues for appeal by ordinance. Subsection (9) states, "a taxpayer may pursue judicial review of a local government's final decision thereon as otherwise provided in such local government's ordinance." § 29-2-106.1(9) (emphasis added). In accordance with this authorization, the city provided appeal rights, in addition to those in section 29-2-106.1(8), to its taxpayers through the procedures set forth in section 20-12-1 of its municipal code.
The municipal code in effect during the relevant time period provided, in pertinent part:

An appeal of a final decision of the City Manager or other designated officer in a hearing . . . shall be commenced within thirty (30) days of such decision. The taxpayer has the alternative to either (1) appeal the decision of the City Manager directly to the Adams County District Court as provided in this Section 20-12 or in Section 29-2-106.1(8) of the Colorado Revised Statutes, or (2) to elect to request a new hearing before the Executive Director *746 of the Department of Revenue of the State of Colorado pursuant to Section 29-2-106.1(3) of the Colorado Revised Statutes.
Commerce City Code of Ord. § 20-12-1(A)-(B) (2006) (emphasis added).
Further, municipal code section 20-12-1 provides, "The Hearing Determination Notice must have been issued before an appeal can be taken by the taxpayer."

C. Mandamus Relief
The company contends the district court erred in dismissing its claim for mandamus relief under C.R.C.P. 106(a)(2). We agree.
C.R.C.P. 106(a)(2) authorizes mandamus relief "[w]here the relief sought is to compel a lower judicial body, governmental body, corporation, board, officer or person to perform an act which the law specially enjoins as a duty resulting from an office, trust, or station." The plaintiff must satisfy three requirements before mandamus relief will issue: (1) The plaintiff must have a clear right to the relief sought; (2) the defendant must have a clear duty to perform the act requested; and (3) there must be no other available remedy. Gramiger v. Crowley, 660 P.2d 1279, 1281 (Colo.1983).
We conclude the company has satisfied each of the Gramiger elements, and the district court therefore erred in dismissing that portion of the company's complaint requesting mandamus relief.

1. Right to Relief Sought
As permitted by section 29-2-106.1(9), the city created an avenue for appellate relief in its Sales and Use Tax Code that was in addition to those avenues provided in subsections (3) and (8) of the appeal statute. The ordinance permits a taxpayer to appeal the decision of the city manager directly to the district court after a hearing determination notice has been issued. § 20-11-1(9). The company timely requested a hearing. As discussed below, the city was required to hold a hearing and to issue a final decision, and the company had a concomitant right to receive a hearing and final decision. Thus, the company's complaint indicated that it had a right to the mandamus relief it sought.

2. Duty to Perform the Act Requested
We construe section 29-2-106.1(9) to mean that, if a local government enacts its own third avenue for appeal, it must comply with the procedure it creates for such appeal.
Here, as permitted by section 29-2-106.1(9), the city created a third avenue for appeal in the form of municipal code section 20-12-1(A)-(B). However, aggrieved taxpayers could only avail themselves of that avenue if the city held a hearing and issued a final decision based on that hearing.
We will not construe statutes or ordinances in such a manner as to frustrate their purposes or lead to an absurd or unreasonable result. See Bd. of County Comm'rs v. ExxonMobil Oil Corp., 192 P.3d 582, 585-86 (Colo.App.2008) (cert. granted Mar. 2, 2009) ("We . . . presume that the legislature intended a just and reasonable result, § 2-4-201(1)(c), C.R.S.2007, and [we] will not interpret a statute in a manner that leads to an absurd or unreasonable result."); People v. Lee, 180 Colo. 376, 381, 506 P.2d 136, 139 (1973) (court will not construe statute in manner that would frustrate statutory purpose). The only construction of section 20-12-1(A)-(B) that would not frustrate the purpose expressed therein and in section 29-2-106.1(9) of permitting an additional avenue of appeal is to infer a duty on the part of the city to hold a hearing if requested by the taxpayer, and to issue a final decision based thereon, so that the taxpayer can later appeal the decision rendered after such hearing. Therefore, we infer such a duty on the part of the city here.
We are not persuaded to the contrary by the "deemed denial" provisions of subsections (3) or (8) of the appeal statute. Both of those subsections contain a time limitation for appealing a decision if the local government has failed to hold a hearing within a prescribed time; thus, the local government is deemed to have denied a hearing to the taxpayer. However, subsection (9), which enables the local government to provide an alternative appeal avenue, contains no such *747 time limitation. And nowhere in the statute or in the municipal code are the time deadlines of subsections (3) or (8) made applicable to local appeals under subsection (9). Since no such "deemed denial" time limitation based on a local appeals process appears in the appeal statute or in the municipal code, we will not infer one.
Nor does the language in section 29-2-106.1(1), C.R.S.2008, which indicates that the procedures in that section are to be applied uniformly throughout the state, persuade us to change our view. Subsection (9) of that section expressly permits a local government, by ordinance, to provide appellate procedures other than those set forth in the appeal statute. It runs contrary to logic to conclude that, regardless of whatever diverse appellate procedures local governments may enact, they must nevertheless be identical to those provided in other subsections of the appeals statute.
We conclude the city had a clear duty to hold a hearing and issue a final decision thereon, in order to allow the company to exercise its appellate rights under municipal code section 20-12-1(A)-(B).

3. No Other Relief Available
Without filing the present action, the company had no other avenue to obtain the relief it sought, namely, compelling the city to hold a hearing and issue a final decision based thereon.
The city argues that the company has failed to satisfy the third element of the Gramiger test because the company could have pursued relief under subsections (3) and (8) of the appeal statute. See § 29-2-106.1. However, because it created its own avenue for appellate relief, the city cannot now argue that the company was required to seek appellate relief under subsections (3) or (8) and be subject to the time bars imposed therein.
Unlike subsections (3) and (8), the city's ordinance contains no provision deeming an appeal denied if no hearing was held or final decision rendered within a given time period. In contrast to those subsections, as we have concluded, the city's ordinance creates a duty to hold a hearing. Because, unlike the city's ordinance, subsections (3) and (8) provide a procedure for appeal even if no hearing is held or final decision rendered, those subsections do not necessarily mandate that the local government hold a hearing. Thus, the company's only avenue to compel a hearing and final decision was a mandamus action to seek compliance with the city's ordinance, which it has brought here.
In reaching this conclusion, we reject the city's assertion that the district court's ruling was correct because the tax assessment here was a "jeopardy assessment" for which no hearing was required by statute or municipal code. See § 29-2-106.1(11), C.R.S.2008; Commerce City Code of Ord. § 20-11-1(9) (2008).
A jeopardy assessment provides a mechanism for the city to immediately collect an alleged tax deficiency, without first conducting an administrative hearing, when delay could make collection difficult or impossible, such as "where a taxpayer intends to leave the City, where properties are being moved from the City, where properties are sold and the proceeds transported beyond the borders of the City and where funds are being dissipated." Commerce City Code of Ord. § 20-13-8(A)-(C) (2008).
In reviewing the district court's ruling on the motion to dismiss, we focus exclusively on the contents of the company's complaint and any materials referenced in the complaint. See Yadon v. Lowry, 126 P.3d 332, 336 (Colo.App.2005). Nothing in the complaint or any materials referenced or incorporated therein gives any indication that the city's assessment here was a jeopardy assessment. On the contrary, the face of the assessment references Commerce City Code of Ord. § 20-11-1 (2008), which provides a right to request a hearing and obtain a final decision. This would tend to undercut the city's position that it was a jeopardy assessment with no right to a hearing.
In sum, we conclude the district court erred in dismissing the company's claim for mandamus relief under C.R.C.P. 106(a)(2).


*748 D. Appeal Under § 29-2-106.1(9) and Municipal Code § 20-12-1
The company asserted a claim for direct appeal to the district court under section 29-2-106.1(9) and municipal code section 20-12-1. We conclude this avenue for appeal is not yet available to the company, because there was no "final decision," as required by section 29-2-106.1(9); no "final decision" rendered "in a hearing," as we have concluded was required by municipal code section 20-12-1(B); and the city did not issue a Hearing Determination Notice, as was required by municipal code section 20-12-1. Therefore, the district court erred in dismissing this claim with prejudice, as it was not yet ripe for review.

E. C.R.C.P. 106(a)(4) Relief
The company contends the district court erred in dismissing its claim for relief under C.R.C.P. 106(a)(4). We agree.
C.R.C.P. 106(a)(4) provides for relief "[w]here any governmental body or officer or any lower judicial body exercising judicial or quasi-judicial functions has exceeded its jurisdiction or abused its discretion, and there is no plain, speedy and adequate remedy otherwise provided by law."
The district court's dismissal of this claim was premature, because, as discussed above, the company stated a claim that it was entitled to a hearing and final decision, both of which the city had failed to provide. The company further stated a claim that the city abused its discretion in failing to hold a hearing. Until the company's other claims are determined on the merits, it cannot be discerned whether there is an adequate remedy at law.

F. Estoppel and Waiver
The district court also dismissed the company's fourth claim for relief, asserting claims for estoppel and waiver. Because the company's estoppel and waiver claims were improperly pled as independent causes of action, we uphold the district court's dismissal of those claims. C.R.C.P. 8(c) (estoppel and waiver are affirmative defenses); Wheat Ridge Urban Renewal Authority v. Cornerstone Group XXII, L.L.C., 176 P.3d 737, 741 (Colo.2007) (equitable estoppel is not a cause of action, but rather a defensive doctrine); see also Fidelity & Guaranty Life Ins. Co. v. Albertson, 2007 WL 4224628 (S.D. Cal. No. 07cv00045 BTM(LSP), Nov. 26, 2007) (unpublished order) (waiver is an affirmative defense, and cannot form a basis for an affirmative claim for relief); Lone Star Steakhouse & Saloon, Inc. v. Liberty Mut. Ins. Group, 2003 WL 21659663, *5 (D.Kan. No. 02-1185-WEB, Mar. 13, 2003) (unpublished memorandum and order) (same).
However, nothing in our opinion should be construed as preventing the company from asserting waiver or estoppel in response to any defense that may later be raised by the city. Because our review is limited to the district court's entry of judgment dismissing the company's claims under C.R.C.P. 12(b)(1) and (5), we express no opinion on the ultimate viability of the company's claims or the availability of defenses to those claims.
The judgment dismissing the estoppel and waiver claims is affirmed. The judgment dismissing the company's claims under section 29-2-106.1(9), municipal code section 20-12-1, and C.R.C.P. 106(a)(2) and 106(a)(4) is reversed. The case is remanded to the district court for further proceedings in accordance with this opinion.
Judge DAILEY and Judge CRISWELL[*] concur.
NOTES
[*]  Sitting by assignment of the Chief Justice under provisions of Colo. Const. art. VI, § 5(3), and § 24-51-1105, C.R.S.2008.
