How can I test for a totally empty inventory

Use this command:

/testfor @a {Inventory:[]}

I tried this and it seems to work, but if you encounter any problems, please comment and I will look into it.