Using both `c.body` and `c.json` in an endpoint results in `response.json()` of `Promise<unknown>`
A null body is not json, it's an empty body. You first need to check to see if the response is JSON, then you can read the json if it exists. Something like this:
app.get("/test", (c) => {
if (Math.random() < 0.5) return c.body(null, 204);