Get rid of unnecessary ternary operator