Good question. There may not be a hard and fast rule other than what sounds better, and I probably won't explain this right, but "types of [singular]" is generally a label that implies a division within a general class noun, while "types of [plural]" is generally a label that implies a grouping of individual items.
"Types of metal", for instance, indicates that you are attempting to discern between various varieties of materials that, in general, are referred to or described as "metal". These types, possibly referred to by their elemental or common names (lithium, iron, magnesium, and alloys like steel), are "metals", plural. To say "types of metals" indicates an attempt to regroup these individual variants under headings more general than their basic names, but less generic than the overall concept "metal". To illustrate: "Gold is a type of metal, belonging to the transition metals". Gold is identified in the singular as a variant of the basic class of metal, then grouped with other types of metal to form a type of metals.
Confused yet? Again, probably no hard and fast rule, but after some thought, this was the best I could come up with.