Added Try-Catch to catch the JSON.parse error

No I catch the JSON error i had before. Works fine.