Check Parent has a getParent method before calling it.
Return the object instance after sorting.