Added further validation to dynamic type builder.