Added try/catch when parsing JSON