There’s the null-safe dereferencing operator (?.) in Groovy… I think that’s what you’re after.
(It’s also called the safe navigation operator.)
For example:
homePostcode = person?.homeAddress?.postcode
This will give null if person
, person.homeAddress
or person.homeAddress.postcode
is null.
(This is now available in C# 6.0 but not in earlier versions)