Walgreens Boots Alliance (WBA -0.87%) is a trusted neighborhood pharmacy retailer that owns around 9,000 drugstores in the U.S.; four out of five people in the country live within five miles of one of its locations. But the company's stock doesn't provide that same level of stability and consistency as it seems to be in a perpetual tailwind.

Shares of the pharmacy retailer have been declining for years, and 2022 is proving to be no exception. Down 32% year-to-date, it has underperformed a struggling S&P 500 that is down a more modest 19%. As a result of the steep drop in price, shares of Walgreens recently hit a new 52-week low. And due to the decline in value, the dividend yield is now up to 5.4%.

Is now the time to load up on the healthcare stock, or should investors be worried about a potential cut to the dividend?

Free cash flow hasn't been strong of late

A good place to start when assessing a dividend is the company's free cash flow. This is how much money it is generating after taking into account capital expenditures and day-to-day operating expenses. The chart below looks at Walgreens' free cash flow balance after paying dividends:

Fundamental Chart Chart

Fundamental Chart data by YCharts

Investors will no doubt notice the nosedive that the available cash after dividends has taken of late. Not only has the company been generating less operating cash flow, but Walgreens has also been spending more on capital purchases. This could be a temporary issue.

A key area that the company has been focusing on of late is expansion into primary care. Last year Walgreens announced a $5.2 billion investment into primary care company VillageMD. Through the partnership, Walgreens plans to set up hundreds of primary care practices at its locations over the next several years.

Dividend investors will want to carefully watch to see the company's capital expenditures to see if they become too burdensome on the business.

Its profit margin remains intact

Another area where investors should pay close attention to is Walgreens' profit margin. If the business' profitability is eroding, that can spell trouble for cash flow and the dividend. The good news here is that despite volatility due to the pandemic, Walgreens' margins are at normal levels.

WBA Profit Margin Chart

WBA Profit Margin data by YCharts

The company incurred a $2 billion impairment charge at its Boots U.K. business in 2020 that brought down its bottom line. But for the most part the company's profit margins have consistently been between the low- and mid-single digits.

Walgreens has been deploying a cost management program to bring its expenses down, so investors may see a bit of an improvement in these numbers in the near future.

The payout ratio suggests a safe dividend

Looking at dividends as a percentage of net income is another way investors can evaluate a company's payouts. And despite the volatility around the pandemic, there are no current signs of concern for the business

WBA Payout Ratio Chart

WBA Payout Ratio data by YCharts

Its dividend is safe, but is the stock a buy?

The only red flag for Walgreens in the charts above came when looking at cash flow. But cash flow can fluctuate from period to period, and as of right now it's too early to say that's a significant concern. The bigger question for investors may be whether the stock is a buy overall. A high-yielding dividend is great, but a free-falling stock like Walgreens' could negate the income it generates.

Ultimately, it comes down to whether you're optimistic about the company's expansion into primary care. If you are, and you're willing to remain patient as Walgreens broadens its business, this could make for a good stock to own, as the stock would possess significant upside if that venture proves to be successful.

If you're a bit more bearish on the company's prospects, you may prefer to opt for safer high-yielding dividend stocks to add to your portfolio instead of Walgreens.