Fixed setting type name to null for enums and collections.

#2435
Merge remote-tracking branch 'origin/master'