Fix end case where value can be a dictionary.

(and not a string of a json)