Handle a null/undefined collection

Noticing while loading data that this library is throwing exceptions when the data is null.

NOTE: I just edited this in the browser as a thought - this should have tests/etc added...