I have a condition like this:
if (someObject != null)
{
templateUri = someObject .getSettingsObject() != null
? someObject .getSettingsObject().getPlanUri() : null;
}
Instead of using multiple null checks, can I club this conditions into a single statement and run my code without getting NULL pointer Exception?