Not sure I would use a try catch to catch the TypeError, but rather just ensure `attr` is an object and then it can't throw errors.

```js
return _.reduce(key.split('.'), function(attr, key) {
    if (!attr || typeof attr !== "object) return undefined;
    // ...
```