Prevent nullpointer exeption when there is no such document id.