At this point we can be sure that `objectOrName` is an object so the use of is_object is unnecessary