Shorten if statement