The Nasdaq 100 index delivered another great month for investors in June, but some stocks in the index didn't enjoy that growth. A handful of Nasdaq stocks fell in price while the index climbed.

Value investors love to swoop in and buy discounted stocks in situations like this, but it's important to make sure that you aren't walking into a value trap.

Is it a good time to buy these six poor-performing Nasdaq stocks when they're on sale? Or should we take a hint from the market and stay away?

^NDX Chart

^NDX data by YCharts

Travel and hospitality stocks

In June, the market got a bit nervous that pandemic recovery efforts were being set back. Governments around the world are on alert as the Delta variant of coronavirus spreads around the globe. That might be good news for some pharmaceutical stocks, but it's a frustrating development for hotels and travel stocks. They've been recovering from last year's major disruptions, and a new wave of restrictions brought back a familiar threat that investors had hoped was in the rearview mirror.

Trip.com (TCOM 1.98%) was one of the most deeply impacted stocks in the Nasdaq, as it fell 11.7% in June. Expedia (EXPE 2.43%) lost 7.7% for the month. Booking Holdings (BKNG 1.81%) and Marriott International (MAR 0.65%) both dropped 6%.

These stocks certainly became cheaper in June, but they're still not great buys for all investors. Even at their new lower prices, they still have higher valuation ratios relative to historical levels. These travel stocks have also been more volatile than other stocks in the Nasdaq 100, so they're more likely to drop further if the market hits a rough patch. The uncertainty and recent discount have created a potential opportunity for investors with high appetites for risk, but most investors should probably stay away.

Person waiting in airport while wearing a face mask.

Image source: Getty Images.

A packaged foods giant

Kraft Heinz (KHC -0.04%) shares fell 7% in June. It operates a relatively stable, mature, low-growth business with a number of popular consumer food brands. Though it was strong in the second half of last year, investors have been lukewarm since 2017 as the company has struggled to produce sufficient cash flow and manage its debt.

KHC Free Cash Flow Chart

KHC Free Cash Flow data by YCharts

However, the past few years have seen progress on both fronts. The company delivered $4.8 billion of free cash flow over the past year, and it's reduced long-term debt by more than $7 billion from its recent peak.

KHC Total Long Term Debt (Quarterly) Chart

KHC Total Long Term Debt (Quarterly) data by YCharts

The stock has struggled for a few reasons. Kraft Heinz is in a tough spot given the current inflation pressures across the economy. Rising prices make food production more expensive, but it's difficult to fully pass those costs on to consumers in a competitive environment. This has investors concerned about profitability over the next few years. It's also challenging for a no-growth stock to attract investors when there are so many interesting growth stories around. Kraft Heinz is purely an income play at this point. That narrative could be threatened if profits contract while the company is also aggressively eliminating debt.

If you think inflation won't be a serious lingering problem, then Kraft Heinz's 3.9% dividend yield is enticing for income investors. This stock probably won't deliver any meaningful growth for the next few years, but the company's cash flow makes its dividend look secure.

A railroad bellwether

CSX Corp. (CSX 0.45%) is one of the nation's largest railway operators, and its stock fell 4% in June. Rail stocks tend to perform well when economic activity is strong since they transport all sorts of materials and goods for a wide range of industries. Economic indicators have looked great, and CSX didn't report anything in June to cause shares to slump. So what's going on?

There was some pressure on transportation stocks last month, especially trucking, which may have pulled CSX down by association. The rail company also has exposure to coal transportation, so investors might be worried about long-term demand for coal energy. A June 18 3-for-1 stock split shouldn't have changed anything fundamentally for investors, but it might have caused a minor disturbance among casual observers or trading algorithms.

More than anything, it looks like CSX is experiencing some natural adjustments after a strong 12 months. It now sits near the high end of its historical valuation range. The stock's forward dividend yield is 1.13%, so there isn't much room for its price to grow as an income investment.

There's nothing wrong with CSX right now, and it could be a nice piece of a diversified long-term portfolio. Despite the price coming down a bit, though, there's still nothing about CSX's valuation that screams opportunity today.