empty object default if metadata undefined in getValue
togglePublishing updates model metadata, closes #533