?.
is a null safe operator which is used to avoid unexpected NPE.
if ( a?.b ) { .. }
is same as
if ( a != null && a.b ) { .. }
But in this case is()
is already null safe, so you would not need it
other.is( this )
should be good.
?.
is a null safe operator which is used to avoid unexpected NPE.
if ( a?.b ) { .. }
is same as
if ( a != null && a.b ) { .. }
But in this case is()
is already null safe, so you would not need it
other.is( this )
should be good.