Lockheed Martin (LMT -0.42%) shares have been caught up in the recent sell-off, giving up more than half of the impressive 49% gain investors enjoyed in 2019.

The selling is in some ways understandable. Lockheed Martin has had to halt production of its F-35 fighter in Japan, and is sure to face other coronavirus-related disruptions. It also announced an unexpected, though not completely surprising, CEO transition.

But the company, the world's largest pure-play defense contractor, also has the benefit of significant long-term contracts, a massive order backlog, and a lack of exposure to consumer and corporate buyers most impacted by a potential recession.

Is Lockheed Martin a buy at these levels?

A well-stocked arsenal

Lockheed Martin is best known for the F-35, a trillion-dollar warplane that after years of trials and turmoil is finally hitting its stride. The Pentagon and allied customers will be buying hundreds of airframes annually for the rest of the decade, providing a stable revenue stream.

An F-35 and F-22 fly next to each other.

Lockheed Martin's F-35 and F-22 flying in formation together. Image source: Lockheed Martin.

The rap on Lockheed Martin for years was it was overly reliant on the F-35, but the company in recent years has established that is not the case. Lockheed Martin has emerged as a leader in hypersonics -- missiles traveling more than five times the speed of sound -- an area the Pentagon has made a top priority.

Lockheed Martin also has a large missile and missile defense business, including its THAAD anti-ballistic system deployed along the Pacific Rim to counter threats from North Korea. And the company owns Sikorsky, one of the U.S.'s primary helicopter manufacturers and a likely finalist in a number of multibillion-dollar helicopter competitions the U.S. Army is expected to run in the next year plus.

Overall, the company has a backlog of more than $144 billion, up 10% in the last year, providing some revenue clarity well into the late 2020s.

Is the sell-off justified?

Lockheed Martin has been falling along with the broader market, caught up in the sell-off caused by the pandemic. There is good reason for the selling: COVID-19 has disrupted everyday life, brought havoc to global supply chains and manufacturing, and left the U.S. and the globe on the brink of a recession.

There is little doubt Lockheed Martin will be affected. U.S. government officials working from home could delay contracting activity, and push awards into later quarters. Factories and research centers will be shut down temporarily.

LMT Chart

LMT stock performance since Jan. 1, 2019 data by YCharts.

But unlike in many commercial markets, lost productivity in defense will likely be recaptured because the dollars funding the work have already been appropriated. Even if the U.S. economy ends up in a recession, the government is unlikely to reduce its long-term demand for fighters and missile defense.

So, while the pandemic is sure to impact current quarter results and is likely to weigh on future quarters as well, I don't believe there will be a long-term material impact on fundamentals. There is even a scenario in which, as part of the outbreak response, lawmakers come together quickly on a fiscal 2021 government budget, eliminating one of the key uncertainties for Lockheed and other defense contractors.

Is Lockheed a buy?

I liked Lockheed Martin last September, when the company traded at 19 times earnings and offered a dividend yield of 2.25%. Today Lockheed Martin is trading at under 15 times earnings, and its yield is almost 3%.

Granted, there is a lot more uncertainty in the markets now than there was back then. But Lockheed Martin is a world-class operator with a steady revenue stream that offers predictability through the downturn and opportunities for future growth. Lockheed Martin remains one of the best buys in the defense sector.