I just noticed that we did it wrong here since `json_decode()` returns `null` on invalid JSON payloads and not `false`.

@tomcyr could you push one more commit to modify this one while you are at it, and move the check for `$this->isValidRid($body)` inside the `if` block? Also, please use `null ===` instead of `is_null()`.