Fixed crash issue when saving xfields with None values.
Fixed issues with losing .nugroup data when crash during document saving.