fix for creating locations with empty metadata

http://manage.dimagi.com/default.asp?110390
Merge pull request #3282 from dimagi/location-metadata-fix

fix for creating locations with empty metadata