There was a warning in the convertValue function. That didn't include the key though, so I've moved it here.