prevents putting a nil in the metadata dictionary