I feel like you'd be able to work with `hash` directly do accomplish what you're after, so you don't have to explicitly type check here. Mind pasting the example XML response(s) that motivate needing to do this?