Reduce if statement to one line.