parseMetafieldValue

The parseMetafieldValue function parses a Metafield's value from a string into a sensible type corresponding to the Metafield's type.