The alternative would be to change the signature of `createLiteral` to take both a feature and geometry type.  Then for mixed geometry collections, you would call `createLiteral` twice if you have both line and polygon geometries.  Not sure if this would be more or less awkward.