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.
Merge pull request #60 from evalcrux/master

null check fixes rendering error for Browser tab after sending JSON arrays to ES