public ObjectNode expectObjectMember(String name, Consumer<ObjectNode> consumer) {
        getObjectMember(name).ifPresent(consumer);
        return this;
    }
Gets a member and requires it to be an object.

@param name Name of the member to get.
@param consumer Consumer that accepts the object member.
@return Returns the node.
@throws ExpectationNotMetException when not present or not an object.
smithy-model/src/main/java/software/amazon/smithy/model/node/ObjectNode.java