you can do if (e.changed && e.changed.id) and avoid a nesting level here. It's common practice in the code to do that pre-check in that way.