Prefer `if key is not None` to `if key` (more explicit)