Change DoRender method to avoid possible exceptions

It's common for the GetCachingID() method to try to access properties on the Model, which will throw an exception if the Model is null. This change allows GetCachingID methods to assume that their Model is not null.