Don't use exceptions for control flow.
Merge pull request #3029 from thobe/2.1-null-on-no-index

[2.1] Don't use exceptions for control flow