more comprehensive handling of nullable columns