As a general rule, the automatic stay terminates after 30 days, where a debtor whose bankruptcy is dismissed, files a second bankruptcy within one year. However, to "play it safe," before you go after the debtor on the unpaid debt, you need to ask the bankruptcy court whether or not the stay is lifted against the money represented by the check. This is called a "comfort order," and it's used by bankruptcy lawyers to ensure that their client won't be held in contempt, when an issue like you're describing arises.
The problem with this particular issues, is that many individual judges differ on their opinion about whether or not the stay is lifted after 30 days. Consequently, the only way to know for certain is to either talk to a bankruptcy lawyer who regularly appears before the judge in this specific bankruptcy case -- or, request a comfort order from the judge.
I hope I've answered your question. Please let me know if you require further clarification. And, please provide a positive feedback rating for my answer (click 3, 4 or 5 stars) -- otherwise, Justanswer retains your entire payment, and I receive nothing for my efforts in your behalf. Note: If you cannot find the rating button on your webpage, please just type in your rating in a response to this note, and customer service will apply the rating for you.
Thanks again for using Justanswer!