Using if statements instead of ternary for string concat