Reduced nested conditional to compound expression