There were a lot of eyes watching Palantir Technologies' (PLTR 3.73%) late September public markets debut, and for good reason.

The data analytics company is backed by Peter Thiel, who has enjoyed great success as a co-founder of PayPal and an early investor in both Facebook and Microsoft's LinkedIn. The company also boasts high-profile links to the U.S. intelligence community, including suggestions that it was Palantir tech that helped find Osama bin Laden.

But for all its plaudits, I have a hard time getting excited about Palantir as a stock right now. Here's why Booz Allen Hamilton (BAH -0.10%) is a better choice for investors seeking exposure to defense intelligence.

Is Palantir even a defense stock?

It's up for debate whether Palantir should be classified as a defense stock. The company gets more than half of its revenue from commercial customers, and it's a product of Silicon Valley and not Washington, D.C.

But the government is a growing part of Palantir's overall business, in particular the Pentagon and spy agencies. In 2019, 46% of the company's $742.6 million in total revenue came from government customers. That's up from 43% in 2018.

Palantir is certainly best known for its government work, including controversial contracts with U.S. Customs and Border Protection to track immigrants and analysis tools that have helped target drone strikes. Palantir also has predictive policing software that has been trialed in New Orleans.

Aerial shot of the Pentagon.

Image source: Getty Images.

Those contracts have shaped the narrative about Palantir and at times have made the company a lightning rod for criticism. CEO and co-founder Alexander Karp in Palantir's registration statement embraced the company's role as a defense contractor and defended it against critics.

"Our software is used to target terrorists and to keep soldiers safe. If we are going to ask someone to put themselves in harm's way, we believe that we have a duty to give them what they need to do their job," Karp wrote. "We have chosen sides, and we know that our partners value our commitment. We stand by them when it is convenient, and when it is not."

Even if you disagree with the designation, an investor needs to be aware of Palantir because these contracts tend to get lumped in with defense contractors. That could shape the perception of the stock and potentially limit its appeal to some investors.

Booz Allen has been doing this for years

Booz Allen Hamilton, by comparison, is much more straightforward. While the company does provide IT and consulting services to some commercial clients, it is primarily in the business of serving U.S. government agencies.

The company has a long history in the intelligence and national security community, including infamously employing Edward Snowden as part of a National Security Agency contract. The Snowden controversy did little to harm Booz Allen's long-term standing with intelligence, with spy work helping to fuel fiscal 2021 first-quarter bookings that were an impressive 2.17 times what was billed.

A normal rap on government-services companies is that with the government always looking for the lowest-cost option, these IT deals tend to be a race for the bottom. But margins on intelligence work tend to hold up better than other areas because of the specialized skills and clearances needed to do the job. And Booz Allen has carefully crafted a hybrid consulting/IT model that it believes is more profitable, and stickier, because of its ability to offer greater technical analysis than its rivals can.

Analysts are predicting full-year earnings growth of 6.8% in the current fiscal year and double-digit earnings growth in both fiscal 2022 and 2023.

Why BAH is the better defense stock

There's still a lot to figure out about Palantir, but one thing for sure is that the stock is not cheap. The company currently has an enterprise value more than 19 times revenue, and it's valued at about 97 times expected earnings.

Without a doubt, there is great potential in Palantir's business, and I expect the company will continue to have success winning government and commercial contracts on the strength of its technology. But a lot of that growth is already priced in.

Palantir shares are basically flat since their Sept. 30 debut, and I wouldn't be surprised to see the stock continue to move sideways while the market becomes more familiar with the company and sees how fast it's able to grow. That could take quarters, if not longer.

In Booz Allen Hamilton you get a much better value proposition, with the stock trading at 21 times expected earnings and at an enterprise value less than 2 times revenue. That seems reasonable for a stock with solid earnings growth expectations and a 1.5% dividend yield to boot.

Palantir has great promise. But investors would be better off buying into a much better-established growth story with a much more reasonable valuation. Booz Allen Hamilton is the better stock to buy.