Changed ternary expression so typescript approves