Checking for presence of index; add index if not detected.