Determines whether it is a valid list index.
static bool isValidListIndex(int index) { return index != -1; }