Combine this and the following if statement using &&