added ability to check if a table in DB exists