Avoid getIndexes crash when called with no parameters.

I know it makes absolutely no sense to call `getIndexes()` without parameters. But is the crash a desired behavior?