Make sure you keep all receipts and obtain a letter from the charity that verifies your volunteer or foster status with the organization.
This ruling also applies to other volunteer expenses for charitable work for an approved organization.
Finally, if you are working for an organization that purports to be a charity and is not - this won't work. So if the tax issue is important to you - trust but verify - and report scammers to the IRS.