get-prop-safe
Safely get nested properties on an object if they exist
Install
$ npm install get-prop-safe
Use
var getPropSafe = ; var obj = one: two: three: 3 four: five: 5 six: 6 7 8 ; ; // 3; // 6; // undefined; // undefined