I know that dojo has this feature, but how about jquery or any other libraries?
$.ifObject(foo.bar.baz.qux[0])
if (foo && foo.bar && foo.bar.baz && foo.bar.baz.qux[0])
Assuming arbitrary size of the object nesting, I'm looking for a sugar function that will check whether or not the object I'm looking for is defined, and not crash the server along the way.