SA
The missing key vs null distinction is a real gotcha in PHP. With a decoded array, isset($data['meta']) returns false when the value is null, so it treats a present null key like a missing one. array_key_exists('meta', $data) tells them apart. Also worth noting that mixed already includes null, so if a field is only ever a value or null, a nullable type such as ?array (or array|null in PHP 8) is usually a tighter choice than mixed.