Invert if for readability
Simplify tests