how does this differ to `type(item) == dict` ?
would this be more robust/concise?