src/Types/BaseType.php
private static function removeNull($value)
    {
        if (!is_array($value)) {
            return $value;
        }

        return array_filter($value, function ($val) {
            return !is_null($val);
        });
    }
private static function removeNull($value)
    {
        if (!is_array($value)) {
            return $value;
        }

        return array_filter($value, function ($val) {
            return !is_null($val);
        });
    }
@param mixed $value Remove null elements if an array.

@return mixed Original value if not an array or array without null elements.