invert the `if else` to improve readability