dropdownup ternary to if statement