Only parse json when we have a string

Only parse `data` when we have a string.