It’s important to understand the IRS’ rules.