They're cheap

Finally, our defensive tech plays look safer because they are fairly cheap. This may protect investors, because cheap stocks often fall less in market declines and rebound faster, says Provence. "And if they have a miss on revenue, it shouldn't hurt the company as much because they are already trading at a discount," he says.

To measure valuation, I'll use Peter Lynch's preferred price-to-earnings-to-growth ratio, which you get by dividing a company's price-earnings ratio by its growth rate. The S&P 500 currently has a PEG ratio of just over 1. Apple trades well below that, with a PEG ratio of 0.57. Intel and EMC come in below the market multiple with peg ratios of 0.89 and 0.9, respectively. IBM and Cognizant carry PEG ratios slightly above the market's.

"They are not cursed with high expectations," say Lowenstein. "So you are getting better-than-average growth at a lower price, and we like that kind of combination."

While valuations are cheap because tech investors view these companies as dinosaurs, in many cases they are exposed to the hot trends like cloud computing (the use of centralized computing to power business software services or mobile devices).

Take Intel, for example. "The knock on Intel is that it is tethered to the PC ecosystem," says Lowenstein, whereas the big growth in consumer electronics is in mobile phones and tablets. But Intel uses its financial clout (remember all that cash?) to fund massive research efforts that are helping it become a significant player in low-power chips for tablets and other mobile devices. "The market is not giving them any credit for that," says Lowenstein. Intel is also a play on cloud computing because servers are key in that trend, and chips for servers are Intel's bread and butter. Besides, the PC is not going away. "The core business keeps chugging along," says Lowenstein. "The risk-reward for Intel is very attractive."

Similarly, IBM may look like a boring mainframe company, but it also has a hand in cloud computing through server and software offerings.

EMC has a growth angle, too, because the amount of data created by companies will grow at about 40% a year for the next several years, says Morningstar's Holt. "All that data has to go somewhere. They are solving a problem that doesn't necessarily ebb and flow with the business cycle."

Cognizant delivers much of its software development from India. With companies looking to contain costs in a tough economy, they'll turn to Cognizant for lower prices.

And a risk at Apple is that it just lost Steve Jobs. "But there are several products in the pipeline that Jobs was a big part of," says Provence. "And there are plans for additional products down the line that he had his hands in."

Despite this potential, Apple stock trades for 9.5 times next year's earnings. "Unless there's a huge miss on revenue, which I don't anticipate, that's a pretty cheap," says Provence.

So, are all the stocks of all these tech companies really "safe"? There's an app for that. As one measure of safety, investors like to look at a stock's "beta," a measure of how much a stock moves along with the market. A stock that normally moves in line with the market has a beta of 1, whereas a stock that moves up or down much more than that the market has a beta well above 1. With the exception of Intel, which has a beta of 1, all of our safe-haven tech stocks have betas below 1, with IBM the lowest at 0.49, followed by Apple at 0.89, Cognizant at 0.91 and EMC at 0.95. There's safety in those numbers.

Stocks mentioned in this article: EMC (EMC, news), Cognizant Technology Solutions (CTSH, news), Apple (AAPL, news), Procter & Gamble (PG, news) and Berkshire Hathaway (BRK.B, news).

At the time of publication, Michael Brush did not own or control shares of any company or fund mentioned in this column.

Michael Brush is the editor of Brush Up on Stocks, an investment newsletter. Click here to find Brush's most recent articles and blog posts.