Image source: Getty Images. 

Let's be honest: There's no such thing as a safe stock. Companies can miss expectations, the economy can hit a rough patch, or the market can just go into a funk. That being said, some companies are less risky than others either due to their enormous size, bulletproof business model, or less economically sensitive industry. 

While there are actually a number of stocks that fit the bill of being on the safer side, we've highlighted three that also have pretty decent upside potential, making each a good buy right now.

Dan Caplinger: The healthcare industry has enjoyed huge tailwinds lately, because the aging demographics of the U.S. population have made providing and managing healthcare services an increasingly important and lucrative business. UnitedHealth Group (UNH -0.02%) is a leader in the health insurance field, and it has found multiple avenues for growth not just from its traditional insurance business but also from the pharmacy-care services and digital consumer health platform that it offers.

UnitedHealth hasn't been entirely without challenges. It has suffered substantial losses from the insurance products it offered under healthcare exchanges created by Obamacare, and the company has said that it might need to pull back from that business going forward. However, growth from the insurance products that UnitedHealth offers to private- and public-sector employers directly has helped offset Obamacare-related losses, and the insurer has done a good job of boosting its premiums in order to keep pace with the rising cost of healthcare. Moreover, the company has been good to its shareholders, with UnitedHealth announcing a 25% dividend increase earlier this month that will take its quarterly payout up to $0.625 per share.

Overall, UnitedHealth has opportunities to keep growing as it extends beyond traditional health insurance to meet the full healthcare needs of its customers. That growth should translate into strong share-price performance over the long haul.

Matt DiLallo: Roughly 85% of Magellan Midstream Partners' (MMP) income is derived from fee-based assets. That provides a lot of security to the company's cash flow, enabling it to pay a pretty generous 4.4% distribution.

That payout is further secured by the fact that Magellan Midstream Partners doesn't pay out all of its cash flow to investors like many of its peers. Instead, the company retains a good portion of its distributable cash flow, which gives it a nice safety net. In fact, last year the company retained roughly $250 million of its $943 million in distributable cash flow, which it used to invest in growth projects. It's the company's practice of retaining more cash flow than most of its peers that has prevented Magellan Midstream Partners from being overly reliant on debt to fund its growth projects. That's one reason why its credit rating is among the best in the MLP sector.

Magellan Midstream Partners' combination of secured cash flow, a big safety net, and a strong credit rating make it one of the safer investment options. Meanwhile, with nearly $1 billion in growth projects under development, the company's future looks really bright.

Daniel Miller: When it comes to safe stocks, there are quite a few that offer to take sleepless nights off the table for investors. One of those safe stocks is definitely Procter & Gamble (PG 0.27%), and despite the stock rising 20% since last August, it's still a safe pick and remains valuable to own in any portfolio.

When looking for safe stocks, go with companies that sell products or services that will continue to be in demand despite economic downturns or changes in consumer behavior. P&G owns a vast portfolio of leading brands across household and personal-care markets, and people will always need those products.

On top of that, the company has focused on shrinking its portfolio, cutting dead weight, which has improved the efficiency of its products. Before P&G began its portfolio transformation it had 166 brands, which will be cut down to 65 when all is said and done. P&G has had a consistent track record of generating a lot of cash, and that could be a trend that only increases as cost-cutting measures and a more efficient portfolio gain traction.

Image source: Proctor & Gamble investor presentation. 

Also, P&G has an excellent track record of returning value to shareholders. Over the past five years the company, returned $60 billion through dividends and share buybacks, and $11.9 billion in fiscal 2015 alone. The next four years, including 2016, the company plans to dish out up to $70 billion to shareholders.

P&G, given its leading brands, vast resources, and scale, will continue to be an absolutely critical partner for retailers across the world. While the company faces headwinds now with foreign currency exchange and never-ending product innovation demand, it's a safe stock for any portfolio, and upside remains for long-term investors willing to wait out its portfolio transformation.