make `checkbounds(collection, indices...)` return `nothing` when returning (#60956)
Before this change `checkbounds(collection, indices...)` has various
possible return types depending on `typeof(collection)`. It would be
more consistent and just as useful to always return `nothing`.