When a stock's dividend yield approaches 10%, investors know that there are some risks with owning it and that perhaps the dividend is at risk. If it were a no-brainer buy, investors would be buying up the stock and the yield would end up shrinking as the share price increases. But if it remains high or goes even higher, that's a sign that investors clearly don't see a reason to be bullish on the stock.

That's what's happening with Walgreens Boots Alliance (WBA 0.57%) stock these days. The company hasn't made any significant increases to the dividend but the yield is now at a monstrous 9.6%. Just a few years ago, it was hovering around 4%. In three years, the retail pharmacy chain's stock price has plummeted by 50%. The company's underwhelming results left investors worried about just how viable Walgreens is as an investment.

It also leads to the question of whether the dividend is safe, and whether investors should expect a cut to the payout. Let's take a closer look at just how sustainable the company's current dividend is.

Walgreens' recent results give investors plenty to worry about

A good place to start when evaluating the safety of a dividend is earnings. If the company isn't profitable or its margins are low, that can be a sign of trouble. Walgreens typically doesn't generate high profit margins to begin with, but in recent quarters, its already weak margins have been looking even worse.

WBA Profit Margin (Quarterly) Chart

WBA Profit Margin (Quarterly) data by YCharts

If the business isn't generating profits, investors should at least expect things to improve. While Walgreens did cut costs and try to become leaner, the results aren't there yet.

The downside of looking at just profits, however, is that they include noncash expenses. To get another view of the company's ability to pay dividends, investors should look at the free cash flow the business brings in.

Is Walgreens' free cash flow strong enough to support its dividend?

Free cash flow takes into account a company's day-to-day operating cash less its capital expenditures. That gives investors a picture of how much cash the company has free to spend on dividends or to invest in growth opportunities. The chart below shows how much free cash flow Walgreens has left over after paying its dividend. A negative value means it isn't generating enough free cash while a positive value signifies a buffer.

Fundamental Chart Chart

Fundamental Chart data by YCharts

Last quarter, the company had $140 million in free cash flow to spare after paying dividends but in earlier periods, that wasn't the case. This is something Walgreens investors should keep a close eye on, particularly as it spends more on the expansion of its healthcare segment and it launches primary care clinics.

But it's clear from the chart that Walgreens' free cash has been deteriorating in recent years, and if this trend doesn't change, the company may have no choice but to alter its dividend policy and consider a cut.

Is Walgreens Boots Alliance stock a good dividend investment to add to your portfolio?

If Walgreens' 9.6% dividend yield were safe, it could make for a great income stock to buy. But yields that high are rarely ever safe. Usually, there are underlying concerns that have led to the stock crashing in value, sending the yield up in the process.

Walgreens isn't a safe dividend stock to be holding onto right now, and investors shouldn't get lured into buying it for its high yield.

I do expect that within the next 12 months, Walgreens and its new CEO, Tim Wentworth, will make an adjustment to the dividend policy, which includes cutting the payout. For the company to continue on with its growth strategy, it needs to free up some cash flow, and the dividend is an obvious place to start.

It will sting for the company to break its streak of annual dividend increases (if it were to increase its dividend for a few more years it would become a Dividend King) and to reduce the payout, but in the long run, it may be the best move for the business.