new way of detecting if table exists.