It's been a rough ride for many retail stocks in 2016, as the sector has wrestled with declining sales, store closings and a few bankruptcies. Yet, real estate investment trusts that own certain retail properties - in particular, the free-standing stores - have soared to record highs this year, with year-to-date total returns averaging more than 34%. And experts say the REITs run may not be over yet, although profit-taking and fears of interest rate hikes could pose headwinds.

Retail stocks have been in a funk, as big-name retail chains, such as Macy's (M) - Get Report , reported falling sales, weak earnings projections, and plans for more store closings. Bankruptcy filings from such retailers as Aeropostale, Pacific Sunwear of California and Sports Authority, added to the angst. And disappointing retail sales data from the Department of Commerce in July fueled investor fears further.

But the retail sales turmoil has little - if any - impact on REITs that own free-standing retail properties.

Retailers signed long-term leases, which obligate them to make fixed rental payments to the REITs in good economic times and bad. "And the leases are very very long - often 20 years in length," said Rich Moore, a managing director at RBC Capital Markets.

If a retailer decides to close a store, it's still required to make rent payments to the REIT. "Retailers can't just walk away from their leases," said Moore.

The exception, of course, is if a retailer files for bankruptcy protection. If this happens, then the REIT is stuck with an empty property with no rent coming in until a replacement tenant can be found.

But many of the recent store closings, troubling sales numbers, and bankruptcies have come from malls and shopping centers - and that's not where free-standing retail REITs focus.

"Their tenants aren't Macy's, J.C. Penney (JCP) - Get Report and Nordstrom (JWN) - Get Report , and many don't have a lot of apparel exposure," said Simon Yarmak, a director at Stifel.

"Most of their exposure is to drugstores, restaurants and dollar stores - and those categories have done quite well."

Generally, the REITs own properties that are leased to retailers that are in stand-alone buildings away from malls and shopping centers. The group includes National Retail Properties (NNN) - Get Report , Realty Income Corp. (O) - Get Report , Agree Realty (ADC) - Get Report , Spirit Realty Capital (SRC) - Get Report , Store Capital (STOR) - Get Report , and Getty Realty (GTY) - Get Report .

Some REITs had exposure to the recent bankruptcy and liquidation at the Sports Authority. But it had little impact on the REITs' bottom line, because it represented only a tiny part of their total rent revenue. For most REITs, no single tenant accounts for more than 10% of total revenue, said Moore.

"There's no one tenant that's going to sink any one of these names on any one day," said Yarmak. "These portfolios are well diversified across tenants, sectors and industries."

If a flurry of drugstores and other high credit-quality tenants suddenly went belly-up at once, investors would have a lot more to worry about than retail REITs.

"If Walgreens (WBA) - Get Report , FedEx (FDX) - Get Report and BJ's Wholesale Club suddenly all went out of business, forget the rest of the market," said Daniel Donlan, a managing director at Ladenburg Thalmann & Co. It would mean the economy is in really bad condition." 

The long-term leases and high credit quality tenants allowed the group to post strong results - and even increase their dividends - during the recession, noted Robert Stevenson, a managing director at Janney Montgomery Scott. "Most of these guys stayed 96%-plus occupied during the global financial crisis," he said.

So, it came as little surprise when investors flocked to free-standing retail REITs in 2016 for their stable predictable cash flows and attractive dividend yield, which approached 5% at the start of the year. The group generated total returns of more than 40% in the first seven months of the year.

However, the group has pulled back 4.5% so far in August, making investors wonder if the run is over.

Experts attribute the recent selloff to profit-taking and concerns about possible interest rate hikes. "With the massive year-to-date outperformance, some folks simply took profits," said Donlan.

But higher interest rates - in particular, the 10-year Treasury - pose the biggest threat. They could potentially hurt both the REITs' valuation and the REITs' ability to make acquisitions to grow. "They trade lock-step with the 10-year treasury," said Donlan.

So, REIT investors get jittery when the Federal Reserve talks about raising rates.

Analysts say it would take multiple rate hikes over a short period of time to truly impact REITs and the 10-year treasury, and most don't expect this to happen anytime soon.

But is the run over for free-standing retail REITs?

"Do I think there's another 20% upside from there? No," said Stevenson. But he does see the group re-testing its year highs and possibly delivering another 10% total return over the next 12 months as long as interest rates don't spike or a macro-event doesn't throw the debt or equity capital markets into turmoil.

Still, there will be profit-taking.

"Any time you have a group at an all-time high, I think people get nervous," said Yarmak. "They don't want to be the last person holding the bag when everybody is heading for the exit."

This article is commentary by an independent contributor. At the time of publication, the author held TK positions in the stocks mentioned.