Optimize ternary condition return

The title says all, really.