adding better type checking for blank strings

ES mapping rules dictate that something indexed as a dict {}, if you send it a blank string, it'll fail to index.

this check cleans blank entries of known dictionaries that are known to be sent in as blank strings.
Merge pull request #1671 from dimagi/xform_pillow_fixes

adding better type checking for blank strings