merge equal imports. raise error if defaultValue type is not string