Lcg/chef 12 attr

See https://gist.github.com/danielsdeleo/da9a8d9a91cc8c2781b0
I think we'll need to check for `kind_of?(Hash)` here rather than just nil. We could have any kind of object that's not nil, but doesn't implement `:[]` or doesn't implement it the way we want (e.g., `Array#[]` only accepts integers/ranges).