Adding checks for tables presence to prevents exception on newly created project when clearing the cache