Yep, ``element.respond_to?(:to_ostruct)`` would indeed probably be closer to the mark, good shout.