fix(metadata): make metadata nullable

so that we can revert to previous version when it was not set