Should we be checking if `element.is_a?(Hash)` or if `element.respond_to?(:to_ostruct)`?