check for existence before create/drop an index