Use a ternary expression instead.