Wrapped JSON.parse() around a try, catch block.