The bidding war for railroad operator Kansas City Southern shows that investors can still find undervalued stocks in the market, CNBC’s Jim Cramer said Wednesday.

The “Mad Money” host said it understood those concerned about a generally frothy environment and noted the exploding interest in cryptocurrency Dogecoin, NFTs and SPACs in recent months.

“But every time I worry about the craziness, it reminds us that stocks may be a lot cheaper than you think, at least for other companies willing to pay for the whole company, even if you are do not do.” “Said Cramer.

Take a look at the competing bids for Kansas City Southern, he said.

On Tuesday, the Canadian National Railway announced its offer to acquire Kansas City Southern in a deal in which the company was valued at $ 325 per share.

That’s more than a planned deal announced by rival Canadian Pacific late last month. Back then, there was a stock and cash agreement with Kansas City Southern that valued the Missouri-based company at $ 275 per share.

While Canadian Pacific has criticized Canadian Nation’s “unsolicited offer”, Cramer said the situation teaches equity investors to study the market.

A Kansas City Southern (KSC) Railway locomotive travels through Knoche Yard in Kansas City, Missouri on Tuesday, January 7, 2020.

Whitney Curtis | Bloomberg | Getty Images

Kansas City Southern, with its exposure to Mexico and the country’s auto industry, has a really important business that has apparently been overlooked, Cramer said.

“The market was clearly completely wrong about this – otherwise you would have received not one but two large tender offers,” said Cramer. “That shows you that before the first offer from the Canadian Pacific, Kansas City Southern was massively undervalued. And yes, I think the other railroad operators have a better understanding of what KSU is worth than Wall Street.”

It’s important not to extrapolate too much, warned Cramer. “That doesn’t mean every company is a bargain. Some of them are too big to buy, others are really too expensive,” he said, while adding antitrust concerns will get in the way of other deals.

At the same time he claimed, “There are many companies like Kansas City Southern.”

“This deal makes you think about it the next time you hear someone whine about how expensive stocks are,” said Cramer. “Sometimes companies in the same industry are willing to pay a lot more for a stock than the market. I think that’s a very encouraging sign. So don’t be discouraged when so many people insist on buying what you believe.” that they have it. ” no value at all. “