Fix reference to null object

to avoid rng.isOnEditable on a null object