Check if model is defined before cloning its attributes

Previously, if the context(@model) was empty then the `attrs = c._.clone(...)` line would fail with an error involving the attempt to access the attributes property of an undefined object. This code checks if the model is defined before cloning and updating the count and returns the empty object if model is not defined.