So I have something that looks like this:
(String) loginResponse.getGroup().getAdditionalProperties().get(something);
and each and every component of the expression could return null. I want to avoid throwing an exception and checking if null after each call doesn't look like the best way to do it:
temp= loginResponse.getGroup();
if(temp!=null){
temp= temp.getAdditionalProperties()
if(temp!=null){
temp.get(something)
}
}etc...
What's a better way to do this?
Thanks