Get a deeply nested value from an object or undefined if an intermediate key is missing