src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.ts/reviveState
function reviveState(state: unknown | undefined): undefined | string {
	return typeof state === 'string' ? state : undefined;
}