Shortening if statement