why not do a simple type check?
``` ruby
object.is_a?(Hash)