fix for creating locations with empty metadata

http://manage.dimagi.com/default.asp?110390