In his seminal work Quality of Earnings, Thornton O'Glove points out that investors can save a boat-load of money by avoiding companies that blow up. He urges investors not to trust a company's accounting. When in doubt, move on to another idea.

But eliminating the bad stocks from your investing universe takes hard work and digging. Fear not, fellow Fools, I've sported my hoe, rake, and gardening gloves and done some digging to see if Peet's Coffee & Tea (Nasdaq: PEET) is a land mine waiting to explode. Even if you aren't a Peet's investor, you'll want to read on because the analysis I'm about to give you will help you to identify land mines in your portfolio as well.

About that possible land mine...
The specialty coffee industry is ultra-competitive. Consider that Green Mountain Coffee Roasters (Nasdaq: GMCR) just announced caffeinated sales growth of 64% while Starbucks (Nasdaq: SBUX) grew same store sales at 9% and expanded margins considerably. Competition is coming from less expensive options too; penny-pinched consumers can now head over to McDonald's (NYSE: MCD) McCafe.

If Peet's doesn't brew up results similar to those of its growing coffee brethren, its stock could be put in the grinder. With companies under so much pressure to grow and perform now, we should keep an eye on accounts receivable to make sure reported sales growth is of high quality.

Here's how
Accounts receivable is money Peet's customers owe it for goods it's already shipped. Hey, if Peet's roasted, bagged and shipped the beans, it should be paid.

You see, many businesses, Peet's included, extend credit to their customers and give them time to pay -- the old "buy now, pay later" routine. Problems can arise when accounts receivable spikes or differs substantially from sales, industry, or company norms. It may indicate "channel stuffing" (when a company forces product on its customers in an effort to "make a revenue number" in the short term), extended credit terms, or that the customer simply isn't paying.

So it's important for you to check out accounts receivable for your stocks to see if they might be playing fast-and-loose with their operations or accounting.

Let's compare Peet's year-over-year growth in accounts receivables (blue) and sales (red) for recent quarterly periods:


Sources: Company reports and Capital IQ, a division of Standard & Poor's.

Before we jump to any conclusions, let's remember that Peet's, like its bean brethren, has made a bold move selling its premium coffee into supermarkets and other retail outlets. You can find the company's specialty beans on the shelves at Kroger (NYSE: KR) or in unique displays at Whole Foods Market (Nasdaq: WFMI). As a greater portion of its business continues to come from the grocery and food service business, we should expect some increase in accounts receivable.

Over time though, accounts receivable should track growth in sales. It sure looks like Peet's is growing its revenue but not doing a good job of collecting it.

Collect that cash already!
But I like Peet's Kenya Auction Lot roast, and the company's clear growth vision too much just to write the company off because of one chart, so let's examine "days sales outstanding," which tells us how long it is taking the company to collect its cash.


Source:  Capital IQ, a division of Standard & Poor's.

Over the past 13 quarters, Peet's has seen this figure rise from 10.1 to 13.6. In other words, it is taking 35% longer to collect cash from its customers. This is great for the supermarkets but terrible for shareholders.

Compare that data to Starbucks, whose days sales outstanding has averaged 10.5 days over those same quarters and has actually been declining. Seeing Peet's cash collection move in the opposite direction of its closest competitor is troubling.

So is Peet's feeling the heat and aggressively pushing its delicious deep-roasted beans on its supermarket customers without making them pay up? I wish we could tell definitively. If this were the case I would expect to see great earnings numbers but decaffeinated cash flow -- that isn't the case with Peet's, nor do accounting entries buried in the back of their SEC filings show signs of accounting shenanigans in Pete's return policy for beans passed their peak freshness.

Red flag? Yellow flag? Green light?
I'm not ready to conclude that Peet's is an accounting land mine waiting to explode. We don't know for sure how much of the rise in accounts receivables is due to growth of the expanded grocery store presence and how much may be due to other factors. But I do know that the stock is trading at 25 times forward earnings estimates and 23 times trailing free cash flow. With rising daily sales outstanding, a frothy valuation, and competition percolating, I'm raising a yellow flag over Peet's and staying away. Until this situation plays out, tread carefully.

But when you do see a company with clear operational difficulties and manipulative accounting, you've found a good candidate for shorting.

Accelerating revenue recognition is a danger sign for investors and one of the five red flags highlighted in a new Motley Fool special report from John Del Vecchio, CFA, a leading forensic accountant. Click here to get it sent right to your inbox. If you share my concern about the low quality of reported earnings -- or if you are looking to short individual stocks for big gains -- enter your email in the box below and we'll also send you the latest earnings quality research the instant it is published -- also free.

Bryan Hinmon does not own shares of any company mentioned, but is an avid Peet's coffee drinker (Kenya Auction Lot, black). Starbucks and Whole Foods are Motley Fool Stock Advisor recommendations. Green Mountain Coffee Roasters is a Motley Fool Rule Breakers recommendation. The Motley Fool has a disclosure policy.