the collection's `toJSON()` and `toJSONWithRelationships()` methods now return null if the collection is empty