setMetric: don't treat empty string as zero

See 5dff119f53