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