cast empty strings to nils at import