Fix isEmpty bug and add tests for isEmpty

isEmpty should verify that a cookie has at most one attribute: its ID.