Convert to a dict only if there is a string to convert as a dict