Would there be any reason why this function shouldn't always return undefined if any one of the properties in the chain is undefined?
Example:
var msg = {payload: {bar: 'last call'}};
RED.util.getObjectProperty(msg, 'payload.bar');
//returns 'last call'
RED.util.getObjectProperty(msg, 'payload.foo');
//returns undefined
RED.util.getObjectProperty(msg, 'payload.foo.bar');
//results in Uncaught TypeError: Cannot read property 'bar' of undefined
I would think it would be better that it simply returns undefined if you mess up at any point in the chain.
I'm getting ready to send a PR, but wanted to check here first.