Despite the doldrums the market has been experiencing this year, it's too early to tell if we're in a recession. Another weak quarter will help determine that outcome. In the meantime, it makes sense to be prepared for an economic downturn by buying stocks that can thrive in that environment.

Let's take a look at these three stalwarts. Healthcare giant Johnson & Johnson (JNJ -0.69%), discount merchandiser Dollar General (DG 0.30%), and storage and moving rental company Amerco (UHAL 0.32%) all do well in a recession because of their business structure.

Johnson & Johnson's reliability in a recession

Shares of Johnson & Johnson are up more than 3% over the past year, while the S&P 500 has fallen 20% in that time. The stock has proven a stalwart in tough times, because it serves the healthcare industry, which is somewhat recession proof. In addition, the company's size and diversity give it enough revenue streams so that if one area is down, another part of the business isn't.

Investors appreciate J&J's resilience as a haven in an economic slowdown. When a recession appears to be rearing its head, they know from experience that the company will likely ride it out, which may also buoy the stock's price.

There's also the income factor, as Johnson & Johnson is a Dividend King that has raised its dividend for 60 consecutive years. Its yield is an above-average 2.64%, and with a sustainable payout ratio of 44%. The company also regularly participates in stock buybacks, so that helps the company's share price as well.

In the third quarter, Johnson & Johnson reported revenue of $23.8 billion, up 1.9% year over year, and earnings per share (EPS) of $1.68, up 22.6% over the same period in 2021. All the company's segments saw sales gains, except for Consumer Health, which is scheduled to be spun off into a separate business next year.

While Consumer Health was down 4% year over year, revenue for Pharmaceutical was up 2.6%, MedTech saw revenue growth of 2.1%, and Worldwide saw revenue rise 1.9%.

The company is also looking to boost its MedTech segment with its $16.6 billion purchase of heart pump maker Abiomed. Johnson & Johnson said it expects the deal to help the segment's sales immediately and will be accretive to its adjusted earnings by 2024.

Dollar General's results have been on the money

Dollar General doesn't just thrive during recessions, but it certainly doesn't slow down during them. Over the past year, the stock is up more than 11%.

The reason Dollar General does so well during an economic downturn is it offers low-cost products, many of which are $1 or less. It's also savvy in where it opens stores, often placing them in areas that are otherwise retail deserts -- low-income sections of cities and rural outposts.

In other words, in many of its locations, it's the only game in town, or at least nearby. The company has also invested heavily in recent years in consumables, adding refrigerated products, so it serves as a grocery store to some people who either can't get to a larger grocery store or don't want to wait in a long line for a handful of products.

In the second quarter, the company reported revenue of $9.4 billion, up 9% year over year, and EPS of $2.98, up 10.8% over the same period in 2021.The company also raised guidance to show it expects annual revenue to grow 11%, up from an earlier expectation of 10% to 10.5%. It also reiterated that it expects annual EPS to rise between 12% to 14%.

Dollar General also offers a dividend, which it has raised by 112% over the past five years, including 13% this year to $0.55 per share, representing a yield of around 0.88%. Its payout ratio is only about 34%, so there's plenty of room for more dividend growth. Like Johnson & Johnson, Dollar General regularly buys back stock, spending $349 million in the third quarter and authorizing another $2 billion on share repurchases this year.

Amerco's revenue is on the move

Amerco is the parent company of U-Haul International, Oxford Life Insurance, Repwest Insurance, and Amerco Real Estate. The company is in the process of changing its name to U-Haul Holding Co. by the end of this year.

The company's stock is down 29% over the past 12 months, but it is a unique business that is a strong play if we do slip into a recession because the company operates storage units. During recessions, consumers and businesses move into smaller homes, offices, and businesses, creating greater storage needs.

The rising costs of rental properties also means that, to keep up, people are moving into smaller apartments, but they still need a place to put all their stuff. They also need an inexpensive way to move that stuff, and Amerco benefits from that fact since rentals of U-Haul trucks and moving equipment are more in demand.

In the first quarter of fiscal 2023, Amerco reported revenue of $1.6 billion, up 8% year over year, though EPS was $17.03, down 3% over the same period last year.

The company said revenue for its self-storage segment was already up, and a recession would only boost that further. It rose 14% in 2020, 14% in 2021, and 29.3% in fiscal 2022.

Amerco trades at a bargain, with a valuation of less than 10 times earnings. That has more to do with the fact the stock is not that well-known despite the U-Haul brand name. It also offers a dividend, but it has been paid irregularly, generally in special dividends.

For example, so far this year, the company paid out two special dividends of $0.50 per share. However, starting in the third quarter of fiscal 2023, the company said it plans to pay a quarterly dividend of $0.04 per share on new nonvoting common shares.