Peter Lynch, in his heyday with Fidelity Magellan Fund (Nasdaq: FMAGX), took a remarkably powerful yet simple approach to wealth-building:

Avoid companies that provide products or services that are too hard for the layman to understand.

Indeed, Lynch's maxim, 'Invest in what you know,' has become a rallying cry for many investors.

For many, this means identifying your favorite products and brands, then snapping up shares of the companies that make them.

Perhaps the most popular 'invest in what you know' stock is Apple (Nasdaq: AAPL), which attracted legions of investors who were already the company's customers. In fiscal 2004, Apple had less than $10 billion in sales -- and that figure swelled to $157 billion in fiscal 2012. The company's market value, which also stood at less than $10 billion back in 2004, eventually zoomed to $700 billion as customers became shareholders as well.

Of course, Apple also shows the downside of investing in companies you love.

Apple's sales growth has begun to slow, and more than $200 billion in market value has been wiped out. The sharp drop has been painful for Apple's fans as they couldn't see looming clouds on the horizon. For them, Apple was, is and always will be a great company.

The lesson: Great companies aren't always great investments.

Here's what to look for in your favorite companies, which need to withstand hard scrutiny before they are worthy of your investment dollars.

1. Strong Profit Margins

Companies do their best to assess what consumers will pay for a product, and they can succeed only if the cost to produce the product is a lot lower. Look for companies with gross profit margins of at least 30% (which you can calculate by dividing gross profits by sales). Robust gross margins mean the company can earn enough to cover the other associated business expenses (such as administrative salaries) and have profits left over.

It's wise to steer clear of companies that lose money once all expenses are accounted for. The only exception is a fast-growing company that is posting quickly shrinking losses. They'll presumably soon turn profitable if sales keep rising faster than expenses.

2. Competitive Advantage

Companies that deliver ground-breaking new products face a serious problem. If the product is successful, imitators will follow. And once consumers can choose virtually the same product from several companies, profit-sapping price wars are inevitable.

The Apple example paints the picture: The company's iPhones and iPads were so impressive that Apple could charge fairly high prices. But rivals eventually came up with rival products at lower prices, and Apple has started to lower its prices as well. For example, the company is reportedly developing stripped-down phones and tablets to better meet competitors' pricing, and Apple's profit margins are likely to suffer as a result.

3. Growing Popularity, Not Fading Trendiness

In recent years, Crocs shoes and Ugg boots became popular, helping investors reap huge rewards by investing in the companies that made them -- Crocs, Inc. (Nasdaq: CROX) and Deckers Outdoor Corp. (Nasdaq: DECK), respectively. But demand cooled for these once-hot products, and share prices fell far from their all-time highs.

The takeaway: Don't avoid trendy companies and their stocks, but you're better off investing in them while they aren't yet widely popular. By the time Crocs' shoes appeared everywhere, it likely was too late to invest in the company.

4. The Right Type Of Growth

The key to any winning investment is sales and profit growth. Is the company taking steps toward expanding sales? Many companies embark on an international expansion or develop product-line extensions to keep the ball rolling.

Many companies look to make a big splash in China, which is already the world's second largest economy. But watch companies' progress.

Handbag maker Coach, Inc. (NYSE: COH) cracked the Japanese market a decade ago, and investors hoped for similar success in China. Yet Chinese consumers haven't embraced the brand in the same fashion, and shares have recently tumbled. Tracking sales trends on a quarterly basis may give you an early glimpse of any potentially deeper challenges.

The Investing Answer: Even as Peter Lynch tracked great consumer companies, he bought shares only if the company was in the early stages of growth. So to update his investing maxim: 'Invest in what you know, and try to get there before the crowd arrives.'