Remove case statement for ternary operator