Is there any shortcut for checking if an objects all elements(and also their elements) are null. For example I want to check If a country object(and its city and its street) is null or not? I don't want to check them one by one like;
country == null || country.city == null || country.city.street == null
public class Country{
City city;
....
}
public class City{
Street street;
....
}
public class Street{
....
}