Handle a string model correctly instead of assuming it is a model instance.