Returns the root of the target object, or itself if the target is a root.
Target object.
T Root object type.
Returns the root of the target object, or itself if the target is a root.