In Groovy you can mutate through optional (null-safe) chaining, eg:
x = [ foo: [ bar: 1] ]
x.foo.bar // 1
x.boo?.bar // null because x.boo is null
x.boo?.bar = 1 // succeeds even though x.boo is null
x.boo // still null