Fix an error with deleting deeply nested attributes

In certain cases the dotted-path hash traversal used for deleting nested attribute keys can turn up a nil Hash. This case was untested.

The error

```
NoMethodError:
       undefined method `[]' for nil:NilClass
```

Should be fixed by not attempting to access a nil as if it were an object that responds well to `[]`