SOURCE: FLICKR USER SIMON CUNNINGHAM.

It's been proven time and time again that long term investing is better than short term trading and it's been shown that dividend paying companies outperform their non-dividend paying peers, but not every dividend stock is worthy of owning in portfolios. For example, a high dividend yield may not be justification enough to own shares in a company that's business isn't on solid ground.

Although there are hundreds of dividend paying stocks to choose from, let's begin by looking at GlaxoSmithKline (GSK 2.11%) and AbbVie (ABBV 0.89%), two healthcare giants that pay investors above market dividend yields of 6.6% and 4%, respectively. Is one a better buy than the other? 

Facing big risks
Dividend yields typically get higher because share prices have fallen because of real or perceived risks, so it's not surprising that both GlaxoSmithKline and AbbVie have big threats facing them.

At both companies, threats are in the form of pending patent expiration on their top-selling medications. In the case of GlaxoSmithKline, patents protecting Advair, its best seller, have already expired, however, patents on the Diskus inhaler used to deliver Advair expire this year. Over at AbbVie, the composition of matter patent for Humira -- the planet's best selling drug -- expires in December.

The importance of both these drugs to these companies can't be overstated. Advair Diskus accounts for roughly a quarter of GlaxoSmithKline's pharmaceutical sales and about 15% of GlaxoSmithKline's overall revenue. Meanwhile, AbbVie's Humira, an autoimmune disease therapy, is responsible for about 60% of its revenue.

SOURCE: GLAXOSMITHKLINE

Sidestepping competition
To blunt the impact of generic versions of Advair Diskus, GlaxoSmithKline developed Breo and Anoro, two next-generation respiratory drugs. Breo won FDA approval for use in COPD patients in 2013 and it won approval for use in asthma patients in April 2015. Anoro got the FDA approval for use in COPD patients in December 2013.

However, Breo and Anoro have failed to deliver Advair like sales despite being on the market for years. Last year, Anoro brought in $111 million and Breo hauled in $363 million, at current exchange rates. That revenue performance pales in comparison to Advair's $5 billion in sales last year.

As a result, GlaxoSmithKline's best chance at thwarting generic interlopers could rest in the complexity associated with crafting both a generic Advair and a generic Diskus inhaler. If that complexity delays FDA approval of generics, or limits the number of generic challengers that reach the market, then Advair Diskus sales may drop more slowly than they might otherwise drop.

Over at AbbVie, management may have a better chance at frustrating generic drugmakers.

AbbVie's method of use patents on Humira could delay look-a-likes until the early 2020s, and momentum is building for new drugs that can offset sales lost to generic competition in the future.

SOURCE: ABBVIE INC.

In January, AbbVie management said that its remaining Humira patents will allow Humira's sales to grow, rather than to shrink, over the next five years. Specifically, management thinks that Humira sales will climb from $14 billion last year to $18 billion in 2020.

If so, then AbbVie appears to have plenty of time left to build demand for other recently launched, or soon-to-launch drugs.

Those drugs include Imbruvica, a blood cancer treatment that recently had its label expanded to include newly diagnosed chronic lymphocytic leukemia patients and that's already selling at a $1.2 billion annualized clip, next-generation hepatitis C drugs, and Empliciti, a therapy for multiple myeloma that won FDA approval late last year. 

AbbVie's plans also include next-generation auto-immune disease drugs that could succeed Humira, including ABT-494, a rheumatoid arthritis drug that entered phase 3 trials late last year.

Looking forward
GlaxoSmithKline is in the midst of a major restructuring that includes a $16 billion asset swap with Novartis' last year and the pending departure of its long-term CEO. Cost-cutting from its restructuring could provide GlaxoSmithKline with enough cash to support its dividend when Advair Diskus generics hit the market, but there's still C-suite uncertainty, and I'm not sure Breo and Anoro adequately insulate the company against its generic threat.

Therefore, it may be AbbVie that's the better high dividend yielding pick of the two. After all, AbbVie's patents conceivably give it a longer runway to maneuver around its generic competitors and the company sports a fast-growing blockbuster in Imbruvica, and a pipeline that could bring in billions of dollars in sales soon, too.