util.py: fix bug with saving

when trying to parse empty metadata