The stock market just had its worst week in two years, with the Dow Jones Industrial Average down by more than 1,000 points. In all, almost $1 trillion in market value was lost this week, with more than $500 billion lost during Friday's massive sell-off. Is the market crashing, or is this just a bump in the road to new highs? Either way, here are three stocks you may want to consider for your portfolio now.

Is the stock market crashing?

Let's take a step back and assess the situation. The stock market isn't crashing -- not yet, anyway. In fact, even after this week's ugly market action, the Dow and the S&P 500 are both still positive for the year by more than 3% each and are up by more than 20% since the beginning of 2017. All we've really done is lost the past few weeks of gains. In a nutshell, at this point, it's a minor market correction, not a crash. We're just not used to seeing corrections lately.

^DJI Chart

^DJI data by YCharts

That said, there's no way to know if the sell-off is done, or if there's more downside to come. Keep in mind, many experts have been predicting a market correction in 2018, and generally speaking, this implies more than just a 3%-4% drop like the one we just saw.

A man looks at a screen of stock chart performance with hands on his head in frustration.

Image Source: Getty Images.

With that in mind, now could be a smart time to think defensively. Here's why Walmart (NYSE:WMT), Berkshire Hathaway (NYSE:BRK-A) (NYSE:BRK-B), and Welltower (NYSE:WELL) could protect your portfolio from a stock market correction or crash and could also let you capitalize if the market reverses course and heads upward.

Rock-solid defensive retail that isn't afraid of Amazon

Walmart is one of the best businesses to own in falling markets and tough economic times. When the economy is strong, Walmart has an extremely loyal customer base. When times get tough, not only does Walmart retain its usual customers, but it also gets the added benefit of shoppers who need to cut back and want bargains. In fact, when the market was crashing in 2008, Walmart's sales -- and its stock price -- increased.

In addition, Walmart seems to be one of the only retailers willing to compete with Amazon for e-commerce business, and it is doing a great job so far by leveraging its massive physical footprint to its advantage. In fact, as my colleague Adam Levy recently wrote, Walmart's online sales are growing faster than Amazon's now.

A fantastic record of increasing book value during tough times

There are plenty of good reasons to like Berkshire Hathaway during a tough market environment. For starters, the company has over 60 subsidiary businesses, many of which are major players in recession-resistant industries, such as utilities.

Also, CEO Warren Buffett and his team have historically done a great job of capitalizing on tough times, thanks to the company's excellent financial flexibility. During the financial crisis, for instance, Berkshire was able to invest in Goldman Sachs and Bank of America at fire-sale prices.

For these and other reasons, Berkshire does a tremendous job of increasing its intrinsic value every year, even in bad markets. In fact, since 1965, Berkshire's book value has only declined in two years. During that roughly 50-year span, the S&P 500 dropped in 11 years, and Berkshire outperformed the index in all but two of them. If you're worried that 2018 could be a down year for the markets, Berkshire could put you in a great position to outperform.

Defensive real estate and a monster dividend yield

One of the primary causes for the recent stock market drop is fears of rising interest rates, as bond yields spiked this week. In fact, the 10-year Treasury yield rose to its highest level in four years.

As a result, income-focused investments have been getting crushed, which has produced some excellent opportunities to scoop up rock-solid dividend stocks at bargain prices.

Healthcare-focused real estate investment trust Welltower is my favorite example to own during a market crash. For one thing, at its current price, Welltower trades for just 13.9 times funds from operations, the REIT version of earnings, and now has an excellent 6% dividend yield.

Furthermore, healthcare real estate is one of the most defensive types of commercial real estate you can buy. During tough times, people can stop staying at hotels, stop using self-storage facilities, and stop going to the mall. Healthcare, on the other hand, is a necessity even in bad times. In fact, Welltower has a 47-year track record of excellent performance in a variety of economic climates.

What happened last time the market crashed?

As a final thought, keep in mind that I'm saying these stocks are crash-resistant, not crash-proof. If the market continues lower, I don't necessarily think that these stocks will go up. However, they should get hit less than most others and rebound nicely afterwards.

The last time the market crashed in 2008, all three of these stocks outperformed the S&P 500. Walmart actually gained 18% that year as investors realized just what an excellent defensive business it is, and Welltower outperformed by 33 percentage points. Berkshire Hathaway beat the market by a smaller 5% margin, but thanks to Warren Buffett's knack for making savvy deals during tough times, the stock came roaring back after. That's why these are great examples of the kind of stocks you want in your portfolio when the market plunges.

Matthew Frankel owns shares of Berkshire Hathaway (B shares). The Motley Fool owns shares of and recommends Berkshire Hathaway (B shares). The Motley Fool recommends Welltower. The Motley Fool has a disclosure policy.