
283 S.W.3d 804 (2009)
CLIFFORD HINDMAN REAL ESTATE, INC., Appellant,
v.
CITY OF JENNINGS, Respondent.
No. ED 91472.
Missouri Court of Appeals, Eastern District, Division Five.
March 10, 2009.
Rehearing Denied April 16, 2009.
*805 Stephen C. Murphy, Michael J. Hart, St. Louis, MO, for appellant.
Jamis Kresyman, Clayton, MO, for respondent.
KENNETH M. ROMINES, Judge.

Introduction
Appellant Clifford Hindman Real Estate appeals the denial of its request for declaratory judgment after the trial court found Appellant had no standing to challenge the validity of a local ordinance because the controversy was not ripe. Because we agree that the facts were sufficiently developed and the controversy sufficiently concrete to allow the court to rule, we reverse. Additionally, because the trial court gratuitously ruled on the merits after finding no standing, we review this determination as well and hold the ordinance invalid because the city exceeded its authority in enacting it.

Factual and Procedural Background
Jennings, Missouri, is a third-class city located in St. Louis County. Such cities are limited in their abilities to tax and license, which extend only to several specifically enumerated businesses, trades, and vehicles. § 94.110 RSMo. (2000). Section 303 of Jennings' Property Maintenance Code ("the ordinance") requires owners of property who want to lease or rent it to pay a fee and obtain a rental permit.[1] The application for the permit *806 includes detailed contact information for the owners of these properties, and it also requires that owners show they are in compliance with another city ordinance requiring them to maintain garbage and rubbish collection. Owners are prohibited to allow tenants to occupy the property unless the application for the rental permit is filed and the fee paid each year.
Appellant is a corporation which owns residential rental property in Jennings. In February 2006, Jennings sent a notice to Appellant which laid out the requirements of the ordinance and warned that should Appellant refuse to obtain a rental permit, all future occupancy permits would be withheld until Appellant complied with the rental permit ordinance. Appellant then submitted under protest the application and fee and obtained a rental permit so that it could allow renters to occupy the premises.
Shortly thereafter Appellant sued for declaratory judgment, alleging that the city exceeded its authority under § 94.110 RSMo. (2000)[2] in passing the ordinance, that the ordinance constitutes an unconstitutional taking of property without just compensation, that it violates residents' right under § 67.317 to display a sign advertising property for sale or lease, that it is unconstitutionally vague, and that it violates the Hancock Amendment. The parties stipulated to the facts, and the trial court then issued a judgment denying Appellant's request. The court found that Appellant had no standing to bring its suit because the claim was not ripe; the court further found, even if the claim were ripe, the ordinance was a valid exercise of the city's police power and did not violate the Hancock Amendment.
Appellant raises two points on appeal. First, Appellant argues that it had standing to bring this declaratory judgment action. Second, Appellant argues that the ordinance is invalid for various reasons. Because we find the first reasonthat Jennings exceeded its authority as a third-class city in passing the ordinanceto be dispositive, we discuss only that aspect of Appellant's second point

Standard of Review
In reviewing a court-tried case, we defer to the trial court's findings of fact but independently review its conclusions of law. Trans World Airlines, Inc. v. Associated Aviation Underwriters, 58 S.W.3d 609, 617 (Mo.App. E.D.2001), see also Andresen v. Bd. of Regents of Missouri Western State College, 58 S.W.3d 581, 585 (Mo. App. W.D.2001). Whether a party has standing to sue is a legal question that we review de novo. Columbia Sussex Corp. v. Missouri Gaming Comm'n, 197 S.W.3d 137, 140 (Mo.App. W.D.2006). Whether Jennings exceeded its statutory authority in passing this ordinance is also a legal question that we will review de novo.

Discussion

Ripeness
A declaratory judgment action requires a justiciable controversy. A justiciable controversy exists where the plaintiff has a legally protectable interest at stake, a substantial controversy exists between parties with genuinely adverse interests, and that controversy is ripe for judicial determination. Missouri Health Care Ass'n v. Attorney General of the *807 State Missouri, 953 S.W.2d 617, 620 (Mo. banc 1997).
The trial court addressed only ripeness, stating the principle that "[r]ipeness does not exist when the question rests solely on a probability than on [sic] an event will occur." The court concluded that Appellant's claim that Appellant would be faced with the likelihood of losing its tenant if it did not obtain a rental permit was "sheer speculation as [Jennings] ha[d] not taken any action against [Appellant]." We disagree. While the trial court's guiding principle is true, the analysis is more nuanced. Appellant's interest is not grounded in sheer probability simply because Jennings had not taken enforcement action against Appellant.
The Missouri Supreme Court, in addressing ripeness of declaratory judgment actions, has said that "[a] ripe controversy is a controversy of sufficient immediacy and reality to warrant the issuance of declaratory judgment." Missouri Health Care Ass'n v. Attorney General of the State of Missouri, 953 S.W.2d 617, 621 (Mo. banc 1997). This means that the parties' dispute must be "developed sufficiently to allow the court to make an accurate determination of the facts, to resolve a conflict that is presently existing, and to grant specific relief of a conclusive character." Id. Furthermore, "an injury need not have occurred prior to bringing a declaratory action because one of the main purposes of declaratory relief is to resolve conflicts in legal rights before a loss occurs." Home Builders Ass'n of Greater St. Louis, Inc. v. City of Wildwood, 32 S.W.3d 612, 615 (Mo.App. E.D.2000) (quoting Ferguson Police Officers Ass'n v. City of Ferguson, 670 S.W.2d 921, 925 (Mo.App. E.D.1984)) (internal quotations omitted).
Therefore, we must inquire whether, even though Jennings had not taken enforcement action against Appellant, the controversy was developed enough for a court to discern the facts and to give concrete and conclusive relief. Here, there were no factual disputes because the parties stipulated the facts. One of those stipulations was that "Jennings has enacted and is enforcing its ordinance known as Section 303." It cannot simply be Appellant's speculation that the ordinance would be enforced when Jennings agreed that it is in fact enforcing the ordinance.[3] Jennings attempts to use the fact that Appellant paid the ordinance fee to show the controversy was not ripe because Appellant suffered no injury through the loss of business or otherwise. However, Appellant paid the fee under protest. This shows that Appellant knew the risk of noncompliance and did not want to have to incur the injury to Appellant's business of enforcement before suing. It would cut against our purpose for declaratory judgments if we required plaintiffs to knowingly violate an ordinance and suffer injury if the facts were clear enough for us to determine validity beforehand. Because the facts are clear, Jennings agreed that it is enforcing the ordinance at issue, and this conflict still presently exists, we conclude that Appellant's action to challenge such enforcement was ripe. The trial court erred in denying Appellants standing. We reverse.

Validity of Ordinance

1. Jurisdiction to Review
The remainder of the trial court's judgment contains conclusions of law relating to the validity of the ordinance. Before we move on to consider this, a threshold *808 matter raised by Jennings is whether we have authority to review and determine the validity of the ordinance. Jennings argues that we, having now held Appellant did have standing, are compelled to remand to the trial court so it may then decide Appellant's declaratory judgment action on the merits. The City is correct that this is normally the appropriate procedure. Had the trial court ruled only upon standing, the proper procedural action would have been for the court to dismiss the suit for lack of standing. See Farmer v. Kinder, 89 S.W.3d 447, 451 (Mo. banc 2002) ("Standing is a jurisdictional matter antecedent to the right to relief."). Our review would then be limited to the standing issue, which we would remand upon reversal for determination of the merits.
However, the trial court did not follow the usual procedure in this case. Jennings urges that the trial court's judgment did concern only standing and that any comment on the validity of the ordinance is not part of the judgment itself. We disagree. After determining Appellant had no standing, which should have prompted dismissal for lack of jurisdiction, the trial court devoted two of its five conclusions of law to analysis of the constitutionality of the ordinance. Additionally, rather than dismissing the suit, the court stated, "judgment on Plaintiff's Petition for Declaratory Judgment is entered in favor of Defendant City of Jennings." Thus, we must first resolve whether we have jurisdiction to review the trial court's improper determination of the merits.
In cases where trial courts err procedurally by deciding merits where they should not, courts of appeal have chosen nevertheless to review the merits when a remand would be futile. See, e.g., State ex rel. Am. Eagle Waste Industries v. St. Louis County, 272 S.W.3d 336, 341 (Mo.App. E.D.2008) (where a trial court dismissed a declaratory judgment action for failure to state a claim yet still made legal conclusions on the merits, this Court reversed the dismissal and reviewed the merits). Here, were we to remand, the trial court would in all probability uphold the validity of the ordinance for the same reasons it did in its judgment this time, prompting Appellant to appeal the merits of that decision. To avoid this inefficient second judgment and appeal where Appellant would not receive a fresh look at the merits from the trial court, we will review the legal question decided by the trial court.

2. Merits
Appellant argues that the trial court erred in upholding the validity of the ordinance for several reasons. The first we find dispositive; namely, that the city of Jennings was not authorized under § 94.110 to require owners to obtain the rental permits per the ordinance. We agree Jennings did not have authority to enact the ordinance and limit our discussion to this ground asserted by Appellant.
Section 71.010 requires that a Missouri municipal corporation "confine and restrict its jurisdiction and the passage of its ordinances to and in conformity with the state law upon the same subject." It is the law of this state that a business, trade, or occupation cannot be subject to municipal licensing unless it is specifically named in the authorizing constitutional or statutory provision. § 71.610. This limit is construed liberally in favor of citizens and strictly against the municipality. City of Odessa v. Borgic, 456 S.W.2d 611, 618 (Mo.App. 1970). As regards third-class cities, their only authority to tax and license is spelled out in § 94.110. The statute enumerates specific businesses and trades, organized into three categories, which can be subjected to licensing requirements by city ordinance. Nowhere listed in this statute *809 is the rental or leasing of residential property. Therefore, Jennings was without authority under § 94.110 to impose this rental permit requirement.
Jennings counters that it was part of its general police power as a city to impose this requirement, because the money went to ensuring proper garbage collection and maintaining a contact registry of owners in case of emergencytasks directly aimed at preserving the health and safety of the citizens of Jennings. However, garbage collection was already required by a different ordinance; section 303 merely required property owners to prove they had complied. A licensing ordinance can have more purposes than raising revenue and still involve licensing. See State ex rel. Jimmy's Western B-B-Q, Inc. v. City of Independence, 527 S.W.2d 11, 14 (Mo.App. 1975). This was simply a fee imposed that owners must pay in order to do business as landlords.
Furthermore, "[a] city has no inherent police power." Tietjens v. City of St. Louis, 359 Mo. 439, 222 S.W.2d 70, 73 (1949). Such power must come by specific delegation of the state or in some cases the express or fairly implied powers of its charter. Id. Third-class cities receive authority from § 94.110 alone. Thus the only source of power for this licensing scheme is § 94.110. Because there is no mention of the rental of residential property in the statute, the ordinance at issue is not authorized and is therefore invalid.

Conclusion
Appellant had standing to bring this declaratory judgment action because the facts were sufficiently certain and the controversy sufficiently real that the court could grant specific and conclusive relief. Further we hold that the ordinance is invalid because Jennings acted outside the scope of its authority under § 94.110 in enacting it. Thus we reverse and remand with instructions to enter declaratory judgment in favor of Appellant.
REVERSED AND REMANDED WITH INSTRUCTIONS.
NANNETTE A. BAKER, C.J., and PATRICIA L. COHEN, J., concur.
NOTES
[1]  In the record and briefs, this document has been referred to as both a permit and a license. Apparently the city of Jennings originally called these "Residential Rental Real Estate Business Licenses," but during the course of the litigation changed the name to "Annual Residential Rental Permit." We will refer to them as rental permits, though in this case calling them permits or licenses is of no consequence: it is a yearly fee that owners must pay to allow them to do business.
[2]  All statutory references are to RSMo. (2000) unless otherwise indicated.
[3]  In fact, even had Jennings not stipulated to enforcement, "plaintiffs must assume the city will enforce its laws." Tietjens v. City of St. Louis, 359 Mo. 439, 222 S.W.2d 70, 72 (1949).
