Handle undefined when altering tables