improvements to Object::debug() and Object::getValue()