Added functionality to compare between multiple object types