V3

You can replace `newData.child('g').val() != null && newData.child('l').val() != null` with `newData.hasChildren(['g', 'l'])`.