Use a conditional rather than early return in `id`
Merge pull request #15677 from sgrif/sg-less-imperative-pk

Use a conditional rather than early return in `id`