Check which condition is met