CDK-686: Add AllowNull fix for primitive types.