Although this is usually programmer error, I think we should return `nil` after the assertion.

It's not always under the caller's control, either. For example, a new method could implemented in an OS update and change the behavior here.