Make sure the type property is assigned.