The market is near all-time highs, with the current bull run now among the longest in Wall Street History. As if on cue, volatility appears to have picked up. The swift and steep drop in late 2018 was followed by an early-year rally in 2019... and then a mid-year swoon.

In times like these, investors often look to add stocks viewed as "safe haven" investments. Trash haulers Waste Management (WM -0.01%) and Republic Services (RSG -0.31%) would fall into that category. But if you don't dig a little deeper, you might find that the protection you expect isn't actually there today. Here's what you need to know.

Humans love to make trash

Some of the greatest advances in human life expectancy came about because of advances in the area of sanitation. Simple things like washing hands, plumbing, and the proper management of refuse should quickly come to mind here. That last one remains a huge issue today, particularly given that humans increasingly prefer living in large concentrations (like towns and cities). That creates logistical nightmares, since there's seemingly no end to the amount of garbage humans are capable of creating.

A hand drawing a scale weighing value and price

Image source: Getty Images

That's where companies like Waste Management and Republic Services come in. There is actually a lot to like about their businesses. There's the simple fact that our towns and cities need companies like these to help them handle the constant flow of trash created. The industry is also built around long-term contracts (which is good for customer and provider alike), which means that downturns should have a minimal impact on a trash hauler's business.

And don't forget the costs. Trash haulers need to have a large fleet of trucks, a very complicated collection network, and some place to send all of the trash that gets collected (a landfill, for example). These things present huge barriers to entry, especially when long-term contracts mean that opportunities to displace an incumbent don't come around all that often. If you're looking to invest in a business that can roll with the punches, Waste Management and Republic Services would definitely pass that screen.

Meanwhile, there's nothing in the cards today to suggest either of these two companies is going to let investors down. After a solid first quarter Waste Management is projecting full-year 2019 adjusted EBITDA growth of roughly 5%. And the giant trash hauler continues to gobble up smaller competitors to further augment its industry position. While Republic's first quarter results were a little soft, it saw adjusted earnings growth of 27% year-over-year in 2018, and is projecting full-year 2019 growth of around 5%.

Mid-single digit growth is roughly what you'd expect from these companies, and it's pretty much what investors will get in 2019. Even if the stock market falls out of bed, it's likely that the businesses underpinning Waste Management and Republic Services will hold up well -- the trash trucks need to keep rolling, no matter what happens on Wall Street.

When good is bad

So if you are looking at the market and feeling a little trepidation, it would make sense to do a deep dive into Waste Management and Republic Services. But even great companies can be bad investments if you don't pay attention to the price you are paying for them -- and that's where this thesis breaks down.

Waste Management's price-to-earnings ratio is around 26 today, way below its five-year average, but only because of an abnormally high number in 2014. Regardless, 26 times earnings is a lot to pay for a company that's only likely to produce mid-single digit growth over the long term. Price-to-sales is a better comparison point, and the current P/S ratio of 3.2 is much higher than the five-year average of 2.2. Price-to-cash-flow and price-to-book-value are elevated as well. The end result is a stock that looks fairly expensive today.

Republic Services fares no better. Its P/E ratio is 27, compared to a five-year average of 24. Price-to-sales is 2.8 times, compared to a longer-term average of 2. The company's price-to-book-value ratio of 3.5 is notably higher than the five-year average of 2.4. And the P/CF ratio is a relatively high 12.7, versus the average of 10.5. Republic Services also looks pretty pricey today.

WM Chart

WM data by YCharts

The reason for these extreme valuations is pretty obvious when you take a look at a stock chart. Over the past year the S&P 500 Index is up a scant 4% or so. Republic Services and Waste Management, meanwhile, are up 26% and 36%, respectively. It looks like investors have already made the move into these safe haven stocks, pushing up their prices along the way. Which, at this point, has turned them into much less desirable options for those looking to protect themselves from the market's gyrations.

Consider other alternatives

This isn't an attempt to suggest that Waste Management and Republic Services are bad companies. They both have great businesses with plenty of potential growth ahead, likely of the slow and steady variety. However, a great business isn't always a great investment, and the high valuations here suggest now is not a particularly good time to buy these two trash haulers. That's doubly true if you are hoping that their stocks will provide you a safe haven if the market should turn south again. The underlying businesses should do just fine, but the valuations here suggests a market downturn could still be hard on the stocks.