check if tables exists before use them in initializers.