check table exists before running index updates