I would prefer `if not ...` and put the assignment inside the conditional.