For most people, there are worse ways to create additional streams of income than buying a few investment properties to rent.

But the U.S. housing market is in a very weird place at the moment. Home values continue to rise across the United States, especially near large metropolitan areas. That’s a good thing for landlords. As their homes rise in value, landlords will likely make a pretty good profit should they ever decide to sell, and that’s on top of any income they make by renting out the units they already have.

We’ve been here before. Bubbles burst, as the great financial crisis of 2008 reminds us. A lot of people lost their homes a decade ago, and some have yet to earn them back.

To help make sense of the shape of the current housing market—especially the residential rental market—I talked to my friend Sam, who’s worked at a major banking institution for more than three decades.

Sam told me there are three things potential landlords should consider before applying for a loan to make that next rental property a reality. And they also shared what you should avoid.

1. Know the property

When an aspiring landlord hopes to secure a bank loan to purchase a new rental property, Sam asks if the property has a rental history. If the answer is “yes,” they’ll tell them they need the income and expense history of that property for the past year, preferably two.

Sam wants to know what the vacancy rate was. They want to know how much the property earned in rent. And they want to know what the property’s current owners paid in maintenance, management, and upkeep.

If the property’s a profit-turner, they’re likely to award the aspirant that loan. If the profits are razor-thin or, worse, the property’s a money-loser, Sam will tell them to keep looking.

2. Have a plan

Sam says that owning a rental property is like running a business. You invest, you put in the work, and if all goes according to plan, you pull in a profit. That’s why every landlord should put a business plan in place before signing a loan for that next property.

Start by setting aside 16 percent of your expected annual income from any property. Plan to lose 10 percent of that income due to vacancies. Ten is a conservative number, and in reality, it might be closer to five percent. But a business plan should be conservative. Three percent of the projected annual income should be set aside for out-of-pocket management and repairs. Then set aside three percent for the unexpected.

If Sam sees the property’s a profit-turner, and there’s a business plan to manage it at a profit, an aspiring landlord is a signature away from become an actual landlord.

3. What—and what not—to buy

Choosing what kind of property to buy is where the investment rubber meets the road. As Sam says, there are risks in investing in every kind of property, but not every property is created equal.

“Don’t buy a duplex,” Sam suggests. “If you buy a duplex and you lose one tenant, you’ll find that you have a 50 percent vacancy rate overnight.”

A better investment, they say, is something with even more units. The more renters, Sam argues, the more leverage a landlord has, because if one tenant moves out, the landlord can mitigate the loss by collecting rent from the remaining renters.

Sam also says investing in single-family homes can be risky. If a landlord rents to a family and that family moves out, the landlord has a 100 percent vacancy issue, and they’ll still have to pay for services for the empty home: water, sewage, and trash pickup.

Renting to a single family can also lead to at least one nightmare scenario: single-family evictions.

Because this country is in a very real coast-to-coast affordable housing crisis, many city governments are adopting laws that make evicting people harder and harder. A lot of these laws protect renters, who make up a sizable portion of any given city’s workforce. It’s in the city’s best interest to protect them from arbitrary and often devastating rental increases, because if it doesn’t, the city will find people who are priced out of their town will be forced to relocate city that will protect them, and they’ll take taxes they pay with them.

Not every renter is a hero. Some tenants, in some situations, will need to go. If a landlord rents out a single-family home and needs to evict the family that lives in it, they better know their city’s rental rules, some of which say renters need a three month heads-up before the final move-out date. Other laws require landlords to pay for the renters’ moving costs following the eviction. And, of course, those evictions can be contested.

“Are you ready to make the repayment on your loan if you have to evict someone that can sometimes take six to nine months with no rental income for that time?” asks Sam. The answer, they say, better be a resounding “yes.”

Sam suggests buying commercial property to rent out.

“If a customer comes in with a million dollars, and is looking for a three million dollar loan, I’d strongly encourage them to not buy residential,” Sam says. “I’d tell them to buy commercial. It’s far less risky.”

Often commercial landlords can lock a commercial tenant into a lease that lasts more than the one-year lease that typically comes with a residential rental lease. More often than not, Sam says, those leases can last up to five years, which is an almost an airtight guarantee for collecting those monthly checks.

If a landlord can rent to a growing chain-let or a large national brand, it’s likely that the business will have some staying power in their community that lasts far beyond those initial five years agreed to in the first lease.

So if you’re a landlord who rents to people who work in your community, treat ’em like gold and continue being the best landlord you can be. But if you’re thinking of investing in a second or third property, you might want to do as Sam suggests. Rent to Starbucks.

Consider the market

Sam’s three rental market rules are general and their mileage may vary when applied to specific homes in specific markets. That’s what Sean Nielson thinks.

Sean is a Seattle Realtor, so he’s watched as his peers find homes and high-end condos for the young tech families of Microsoft and Amazon. But he noticed they’re overlooking a key demographic: retiring and downsizing baby boomers.

When we spoke with Sean, he said that he’d just closed on a client’s $2.7 million home that hugs the property line of one of Seattle’s most posh golf courses. Sounds great, right? The thing is, Sean’s client and the new buyer were ready to close on this deal six months ago, but couldn’t because his client had nowhere to move to.

“I’d say go for higher-end rental and rent to baby boomers,” he says. “Buy a nicer condo or a decently sized home with a garden and rent to a downsizer who, now that the kids have left, no longer have a use for a big home. Let them pay your rent.”

They might not be permanent renters, but renters are never permanent. So while they’re contemplating buying a new home in Phoenix, Scottsdale, Florida, or California, renting to them is a safer bet. You know they’re good for the money, because they’re retired. And because of their age, you’ll also know they’ll live lightly in the home—it will require only minor repairs when they do decide to live someplace else.