Convert only if exactly one

I copied this function out for another use and i had there some entries, where the value was "array" without any values.

This generates warnings, since `$value[0]` is then not accessible