Mmm `json_decode` can return `true`, `false` or `null`. So you're right, let's use `(null === $data || false === $data)`.