Adjusted ternary operator to comply with coding standards