more defensive code around docstore