Only propagate the touchOwners call if a relationship exists

The problem is in the case of a belongsTo relationship (that I came across).

If the foreign key is nullable and could be null, this throws an error of:

```
Fatal error: Call to a member function touchOwners() on a non-object
```

This fix checks that the relationship exists before trying to propagate the call (since the result might be null).

Unit tests attached to demonstrate the problem before and pass with the change in the Model class.
Too many new lines here.