index type checking