Change getEsFields function to only stringify objects, see #77