Avoid errors on sql table check