We can (now?) use value_to_string and avoid problems with custom fields.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>