Dont check discriminator before setting typeDef on new object