Use a ternary for simple if/else assignment