Add new function to check if table exists.