Change ternary operator usage to single-line