Remove nested ternary