try/catch around JSON.parse to catch "undefined"