small refactor in column typecaster