fixing condition check for fixing dict props, test
Merge pull request #1689 from dimagi/xform_pillow_fixes

fixing condition check for fixing dict props, test