Added checks for object type, units.