Q: I'm worried that the stock market is getting too expensive and is overdue for a correction. Should I sell some of my stock portfolio and lock in the gains?

With the Dow Jones Industrial Average breaking through 25,000 for the first time recently, the almost nine-year bull market is still going strong. However, many experts are calling for a major correction in 2018.

The first important thing to realize is that no expert has a crystal ball that will tell them when a correction might take place. There were experts calling for the end of the bull market when the Dow crossed 20,000 last year, or when the S&P 500 first eclipsed its pre-crisis peak back in 2013. If you had listened and sold your stocks at those points, you would have missed out on big gains.

From a long-term perspective, it's always a good idea to own stocks. However, if you think the market may be getting a little too expensive, it could be smart to make some defensive investments: Stocks that are likely to do well if the market does drop, but also have strong growth potential if the bull market continues.

Wal-Mart Stores is one good example of a business that tends to do well in good times and bad, and also is doing a great job of incorporating e-commerce into its strategy. Healthcare conglomerate Johnson & Johnson is another case in point, with its predictable cash flow and the recession-resistant, nondiscretionary nature of its core products.

Matthew Frankel has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Johnson & Johnson. The Motley Fool has a disclosure policy.