Blue chip stocks can be ideal investments to buy and hold for decades. However, even these types of stocks haven't been immune to the current bear market. A couple of stocks that have been falling recently and that are near multi-year lows are Johnson & Johnson (JNJ 0.59%) and Home Depot (HD 0.47%). If you have enough in savings and can afford to invest $5,000, here's why you should consider buying shares of one or even both of these stocks.

1. Johnson & Johnson

Over the past 12 months, Johnson & Johnson's stock has fallen 13%. However, historically, this has been a relatively safe investment to own, as in 10 years its stock value has increased by around 90%. The healthcare company has also increased its dividend for an impressive 60 straight years, earning it the title of Dividend King. Few companies can offer investors that kind of stability. 

However, Johnson & Johnson has faced many legal issues. One of its most daunting is the one surrounding its talc baby powder products, which plaintiffs allege caused them to develop cancer. It could cost the company billions, and whether it's in the single digits or tens of billions depends on how many of the nearly 40,000 claims prove to be successful.

Investors are feeling bearish on the company. A judge in an appeals court recently dismissed the idea of Johnson & Johnson dumping its lawsuits into a subsidiary, LTL Management LLC, and putting it into bankruptcy for the purpose of capping those claims. The battle isn't over, however, as Johnson & Johnson is taking the case to the U.S. Supreme Court. 

The legal costs that could weigh on the company if Johnson & Johnson isn't successful are likely a key reason why the stock is down right now. JP Morgan analyst Chris Schott estimates the talc-related liabilities could total $9 billion. But while the situation is serious for the company, its strong financial position should enable Johnson & Johnson to be able to handle the costs relating to the lawsuits. As of the end of 2022, it had over $23 billion in cash and investments. Plus, it generated more than $17 billion in free cash last year, which was less than the nearly $20 billion it banked the year before. 

Court cases can take years to drag out, and that would give Johnson & Johnson the ability to spread out the potential financial burden from these lawsuits -- assuming that its strategy to limit the cases by way of bankrupting LTL Management LLC proves to be unsuccessful. There is some risk here, but it could be a calculated one worth taking.

Johnson & Johnson's stock hasn't been this low since late 2020. And with the company spinning off its consumer health business this year and focusing on medical devices and pharmaceuticals, it may become a faster-growing operation, making it a better buy in the long run.

Although it's not an entirely risk-free investment, Johnson & Johnson can make for a good contrarian buy right now. At 3%, its dividend yield is also well above the S&P 500 average of 1.7%. On a $5,000 investment, that can mean $150 in dividend income for your portfolio each year -- and more if the dividend increases. Plus, with the stock at a low, there's the potential for you to also net a good return just from buying and holding shares of Johnson & Johnson.

2. Home Depot

Another normally safe dividend stock that hasn't been doing well over the past 12 months is Home Depot. It too can be a great place to invest $5,000, as the home improvement retailer's shares are down around 9%, faring only a bit better than Johnson & Johnson.

The company benefited from a surge in consumer spending during the early stages of the pandemic, but that has since come to a grinding halt. In its fourth-quarter results, for the period ending Jan. 29, its sales totaled $35.8 billion and were flat from the prior-year period. The company missed expectations, and its guidance for the new fiscal year also implies no growth.

It's easy to see why investors may be bearish on the business. But in the long run, this can still be an excellent buy, as home repair is a necessary expense for consumers. Renovations are more discretionary, but there could be much stronger demand in the future once economic conditions improve. Despite inflation and people tightening up on spending, Home Depot has still been performing well. In the trailing 12 months, the company netted a solid profit margin of 11% and generated $11.5 billion in free cash flow.

Buying shares of Home Depot can be a great move today. It's trading not just around its 52-week low, but also its two-year low. And with a dividend yield of just under 3%, it's also a great income-generating investment to own.