[#5569] Handle null values properly

- Previous fix led to:
  ```php
  'null' => ,
  ```
- Fix properly echoes the null value:
  ```php
  'null' => null,
  ```
Merge branch 'hotfix/5569-null' into develop

Additional fix for #5569