Combine the if statement into a large condition using &&