check doc name exists method