check index is a number