Fixed toJson method for collection

Collections do not have model.collection method, but they do have .toJson