Add try-catch to getJSON