this method should parse json if the only argument it receives is a string. that would save us doing `JSON.parse(...)` everywhere.