try/catch around JSON.parse() to catch errors