Splitting out ternary into if/then