Use clearer logic in if statement