null check to prevent browser rendering problem

Submitting larger JSON objects to ES, incuding array objects, throws an
error here and prevents the Browser tab from rendering.