per Pull Request review, check if doc exists.  Otherwise, it'll cause an NPE