Fix bug: falsy JSON produces response body {}
This commit fixes the bug causing JSON responses with values `null`, `false`, `0`, or `""` to produce an empty object `{}` response body.