wrap JSON.parse in try/catch