nil supports is_a? since it is an object, so:

```ruby
doc = descriptor_document['descriptors'].is_a?(Hash) && descriptor_document['descriptors'] || {}
doc.keys.map #...
```
Is more readable I think.

```