Fixed error in conversion if a value is not a string.