Johnson & Johnson (NYSE:JNJ) is a big name in the healthcare industry that has produced stable and consistent returns for investors over the years. It also pays a growing dividend yield. But on the flip side, the company's run into a series of problems over time relating to some of its products.

While J&J's been able to handle the adversity thus far, the inevitable question that comes up is whether these problems could get worse and ultimately have a more adverse effect on the company's financials. As good of an investment as J&J has been over the years, investors may be wondering if it's still worth the risk. Let's have a closer look and assess whether the stock belongs in your portfolio today.

Lawsuits have been manageable -- for now

In each of the past 10 quarters, J&J's recorded revenue of at least $20 billion. During that time, only twice has its profit margin been less than 14%. The healthcare giant's been a great model of consistency in recent years. But as impressive as that is, it's the company's legal woes that have been making the headlines.

Medical products in a pharmacy.

Image source: Getty Images.

J&J's faced lawsuits relating to its role in the opioid crisis, vaginal mesh implants, its Risperdal drug, and its talc baby powder products. As problematic as those issues have been and although they've dragged the company through the mud, their effect on J&J's financials hasn't been significant thus far. In the company's first-quarter results of 2020 that it released on April 14, J&J reported litigation expenses of just $0.1 billion, and that's down from $0.4 billion in the prior-year period.

For the full year of 2019, J&J incurred $5.1 billion worth of litigation expenses, which is about 6.2% of the $82.1 billion that the company recorded in revenue that year. This was primarily a result of opioid litigation, which cost $4 billion. In 2018, the company's litigation expenses totaled $2 billion and were a more modest 2.5% of revenue.

The risk for J&J is that the larger these lawsuits get, the more of a material effect there may be on its financials. And with Washington state announcing early in January that it would be suing J&J as a result of its own opioid crisis, it's clear that these problems aren't going away anytime soon. So far the costs to J&J haven't been enough to deter investors, but that could change the more the company gets entangled in these lawsuits.

J&J's been a good buy despite the adversity

There's no doubt there's a dark cloud that's been hanging over J&J in recent years due to the threat of litigation. But the drug manufacturer's stock is still up around 45% over the past five years. That's better than the S&P 500, which rose close to 40% over the same period.

And that's without factoring in the New Jersey-based company's dividend, which today yields around 2.7% annually -- which is also above the 2% that investors can typically earn from an average S&P 500 stock. When the company hiked its payouts earlier this year by 6.3%, it was the 58th straight year that J&J has done so. As a Dividend King, J&J's been one of the most consistent dividend stocks to own.

Is the stock still worth the risk today?

There isn't a compelling reason today to suggest J&J is a bad buy today -- only that it might be at some point in the future. And that's because as long as litigation expenses remain manageable, so too will the risk.

Even when a judge slapped the company with an intimidating $8 billion fine relating to its Risperdal drug last year, the financial penalty was eventually lowered to a much more manageable cost of just $6.8 million.

The danger is that the day may come, whether it's related to opioids, talc baby powder products, or something else entirely, when the hammer gets dropped on J&J and it gets saddled with a much more material expense on its books. And with many other good healthcare stocks to invest in that pay dividends, J&J's not a stock that I'd risk putting in my portfolio given the company's uncertain future.

Investors who want to buy shares of J&J should pay close attention to the company's legal problems, because if the cases continue to grow and get larger in scale, that could be a sign to get out before a high-profile case leads to a significant increase in J&J's litigation expenses.

J&J's a good dividend stock, but it isn't an investment that you can just buy and forget about.