Streams API is crashing my bot

You should still wrap the JSON call in a try catch.

Since null or empty is all well and good, but if you got a broken transfer (so a cut off JSON packet) or some other parse error, the try/catch works best.

That said if you get a NULL you probably got a non 200 HTTP Code.

So, make the HTTP request.
Then check the HTTP Code for a 200
Ignore/error out/stop any non 200’s as thats a server side error
Then if you do get a 200 OK, then continue to the JSON parsing.
But still wrap that in a try/catch.

Basically, check the HTTP Error Code for a 200 (OK)