By removing the `not` and turning the conditions around, this code can be simplified.