This should be `if not match:`. `match` is `None` if pattern does not match.