Finding a safe stock to hold during the COVID-19 pandemic and the recession the economy's in right now is no easy task. But pharmacy retailer Walgreens (NASDAQ:WBA) may be proving to be one of the safer investments to hold in your portfolio right now. The company released its quarterly earnings earlier this month, and there were many positives to pull from them. Here are three reasons the company's latest results suggest its stock could be a pandemic-proof investment:

Sales remained strong even amid a lockdown in the U.K.

Walgreens released its third-quarter results on July 9. And even amid challenges due to COVID-19, the company still squeaked out revenue growth of 0.1%. At $34.63 billion, the company's top line wasn't a whole lot different from the $34.59 billion that Walgreens reported in the same quarter last year. But that increase looks much more impressive when you factor in the fact that the company's retail pharmacy international segment was down more than 31% from a year ago. The company blames the disappointing results on COVID-19, as many of its Boots UK stores were closed during the quarter as a result of a lockdown.

Pharmacist wearing a surgical mask while handing bag to customer.

Image source: Getty Images.

Given the nearly $900 million reduction in revenue from the international segment, it was Walgreens' continued growth in the U.S. market that helped its sales numbers stay in positive territory for the quarter. Sales were up 3.2% in its U.S. retail pharmacy division, almost completely negating the decline from the international pharmacy segment. Minor improvements in Walgreens' wholesale segment helped give the company's top line an added boost and push it above the prior-period sales numbers.

Walgreens recorded an adjusted profit and generated positive cash flow

Arguably more important than sales is the company's bottom line. And that too looks to be strong. Although Walgreens' adjusted net earnings declined by 46% from the prior-year period, they still came in at a positive $723 million. The company reported a net loss of $1.7 billion in the quarter, but that was primarily due to impairment charges of $2 billion related to Boots UK.

Adjusted earnings can sometimes more closely reflect the strength of a company's financial position, because they account for non-recurring items like impairment. They can also be a better indicator of how a company did from a cash perspective, because they can often factor out non-cash items.

Overall, in Q3, Walgreens generated $914 million in positive cash flow from its day-to-day operating activities. These are some impressive numbers given the company's higher supply-chain costs and cleaning expenses due to COVID-19. Its financial strength and diversification are key reasons why Walgreens is able to keep paying and increasing its dividend payments.

The company raised its dividend for the 45th straight year

On July 8, Walgreens declared it would be raising its dividend yet again, by 2.2%. Shareholders will now be receiving quarterly dividend payments of $0.4675. At a share price of about $40, that's a dividend yield of about 4.7% -- well above the 2% investors can typically expect from the average S&P 500 stock. This also marks the 45th year in a row that the company's hiked its payouts. As a Dividend Aristocrat, Walgreens continues to be one of the safest dividend growth stocks to own for long-term investors.

Is the stock a buy?

Given its resilience amid the COVID-19 pandemic and how important the pharmacy retailer is proving to be to customers right now, it's hard not to like Walgreens as a long-term investment. Not only does it pay a great dividend, but the healthcare stock's also cheap, trading at just 10 times earnings and 1.4 times its book value.

Although Walgreens' stock got a boost from its Q3 results, it's still down 31% this year (the S&P's declined by just 1%). But with many stocks soaring at all-time highs and obscene multiples, Walgreens looks to be one of the better value buys still out there today.