Fix type check for CollectionIndex.