If you're scared to invest in brick-and-mortar retail businesses, you certainly aren't alone. The recent wave of retail bankruptcies has kept a lot of investors away.

However, not all retail is in trouble, and National Retail Properties' (NNN 0.75%) latest results prove it. Here's a look at this retail real-estate giant's latest earnings, and why the company is doing so well.

Couple walking down the street with shopping bags.

Image source: Getty Images.

Strong growth and increased expectations

National Retail Properties reported first-quarter adjusted FFO (funds from operations, the REIT version of earnings) of $0.67 per share, an impressive 11.7% year-over-year growth rate. Furthermore, the portfolio's occupancy has gotten even better. National Retail Properties finished the quarter with 99.2% of its 2,800 properties occupied, up slightly from 99.1% at the end of 2017.

The company's quarter was so strong that management decided to raise its outlook for 2018. Now, the company sees adjusted FFO of $2.66-$2.70, up from a previous guidance range of $2.64-$2.68.

Why is National Retail doing so well while so many retailers struggle?

These results may seem to contrast with the retail-related headlines you've seen recently. With major retailers like HH Gregg and Toys "R" Us declaring bankruptcy, and others like Sears, J.C. Penney, and more struggling to survive, it may seem that brick-and-mortar retail is in an uncontrollable downward spiral.

The reality is that this is true for some kinds of retail. Specifically, retailers who sell discretionary products without a discount-oriented model are in trouble.

On the other hand, some types of brick-and-mortar retail are actually doing quite well, and National Retail Properties' portfolio is full of them. Specifically, these three types of retail are thriving:

  • Non-discretionary retailers: These are retail businesses that sell things people need. For example, people need gasoline to put in their cars and service centers to get those cars maintained, and neither of these businesses are significantly threatened by e-commerce. These two categories alone (convenience stores and auto service) make up roughly 25% of National Retail's portfolio.
  • Discount-oriented retailers: If you're a member of Costco, Sam's Club, or BJ's Wholesale Club, you probably know that these businesses are having little trouble getting customers through the door. The reason is that discount-oriented businesses often offer deals that even the online giants can't match. BJ's is the ninth-largest tenant in National Retail's portfolio.
  • Service businesses: What do businesses like restaurants, theaters, family entertainment centers, fitness centers, and medical service providers have in common? Consumers have to experience these businesses in person, which means an inherent immunity to e-commerce headwinds. These five categories combine to make up a whopping 39% of National Retail's portfolio.

In addition, the company has done a great job of growing despite depressed REIT valuations. Instead of issuing more shares to help fund acquisitions, the company financed much of its first-quarter growth through capital recycling -- that is, strategically selling lower-potential properties to acquire higher-potential ones.

And the company doesn't see any shortage of opportunities. In fact, CEO Jay Whitehurst specifically cited the "solid pipeline of new acquisitions" as one of the reasons for raising National Retail's 2018 guidance.

The right kind of retail investment

To be clear, there are lots of retail stocks to stay away from. Just to name a couple of examples, you won't catch me buying Sears, J.C. Penney, or any REIT that has substantial exposure to them, even if the stocks themselves look ridiculously cheap.

However, the takeaway here is that grouping all retail into the same category is no more effective than grouping all technology stocks or biotech stocks. Just like all other industries, there's a right and wrong way to invest -- and National Retail Properties is a great example of the right way to invest in retail.