Enclose ternary expression in parentheses when returning.