Summarize this article in one sentence.
Sometimes, landlords rent out residences that are not legally recognized by the local municipality. Illegal residences are more common than you might think. Research state and city  regulations in your area. You can generally contact government agencies such as Building and Safety or Housing agencies, to help you determine whether your residence is illegal.  For example, some portions of a town or city are only zoned for single family residences. If you are living in a house that has been converted into a multi-unit apartment, the lease may be invalid.  If you are renting a residence in an area that is only zoned for commercial use, your lease may be invalid.  In some cases, landlords will rent illegal residences without the proper permits. For example, if your landlord is renting out a garage or guest house without a permit, this rental may be illegal. A lease sets fixed terms and conditions for a set period of time. A rental agreement usually does not set an endpoint and is a month-to-month agreement. If your landlord represented a monthly rental agreement as a lease, you may be able to terminate the agreement.  If your agreement stipulates that you will rent the residence for a set period of time, such as one year or 24 months, you probably have a lease. Leases usually cannot be violated or abandoned without penalty.  A monthly rental agreement can generally be changed with written notice. This means that, monthly tenancy agreements can usually be ended on short notice. In most states, all you must do is provide the landlord a 30 day notice of your intent to leave. Check your state for its regulations. If your landlord or property manager is not who they claim to be, you may have an automatic way out of your lease.  For example, your landlord could be a master tenant who is subleasing you their residence without notifying the owner or property manager. Leases are usually invalid in this case.  In some cases, the name on the management agreement and lease may not match. If this is the case, you may be able to claim that you do not have a legal relationship with one of the entities. In some cases, the company that is managing your property may not legally exist. Some situations that arise may give you a legal basis to terminate your lease. Some of these, such as being called to military duty, are regulated by federal law. Most are up to individual states to determine. The following are a few reasons why you might be able to terminate your lease without a penalty:  Getting called to active military duty.The Service members Civil Relief Act (SCRA) allows military service members who are called for active duty for more than 90 days may terminate a lease. Military service members entering active duty for the first time are also eligible to terminate a lease early.  You must deliver written notice of your termination and a copy of your military orders to your landlord. The termination date for a lease that requires monthly rent is 30 days after the next time rent is due. For example, if the next rental due date is December 1, the effective termination date is February 1.   Domestic violence within the place of residence. In many states, a survivor of domestic violence may terminate a lease with 30 days notice.You may be required to provide proof of this violence, such as a police report or court protective order.  Serious injury and hospitalization. In some states, serious illness, injury, hospitalization, or the necessity of moving to an assisted-living facility will provide grounds to get out of a lease.  Declaring bankruptcy. Many leases have a Force Majeure clause, which translates loosely to “act of God.” These clauses allow for the tenant and/or landlord to suspend or terminate a lease if certain circumstances beyond their control occur. For example, natural disasters, terrorism, and civil unrest may all be possible reasons to invoke a Force Majeure clause. Outside of the basic laws pertaining to habitability, most states have extensive civil codes that explain the kinds of basic accommodations that landlords should be prepared to provide. They also govern what landlords may and may not do.  For example, a civil code may tie a lease to a job on the premises, such as groundskeeper or manager. If you quit the job, you may not be required to maintain the lease.  Civil codes require the enforcement of the sections of lease agreements that deal with general repairs. If your lease requires the landlord to provide and maintain a refrigerator, for example, you can vacate the apartment if they fail to do so.  As long as the apartment is habitable, you cannot vacate your lease without first taking your landlord to court. Additionally, you must continue paying rent until you have a court order stating that you can terminate your lease. If your landlord makes weak or no effort to respond to your demands, you can take him or her to court for breach of contract. However, make sure that any demands you make of your landlord have a basis in your lease agreement. You cannot make frivolous demands.
Determine if your residence is an illegal unit. Determine whether your lease is actually a monthly rental agreement. Research your landlord. Use circumstances beyond your control to your benefit. Investigate a Force Majeure clause. Take advantage of civil codes.