Updated getObjectsOfType