Fix an issue without defaulting an empty object

This fixes the issue of checkbox collapse not working appropriately.

Also completed the tests for the refactored collapse.