don't assume Symbol.valueDeclaration exists (#4326)
don't assume Symbol.valueDeclaration exists (#4326)

From the TypeScript compiler source, it's possible for
symbol.valueDeclaration to be undefined, and within Google we have code
that crashes on it being undefined.

I have been unable to come up with a test case that reproduces this
crash, so instead I just looked for references to .valueDeclaration in
the code and added an additional check at each reference.

(You might ask, doesn't TypeScript's type system help with exactly this
problem?  And the answer is yes, but the TS compiler API itself
unfortunately lies in its types, and claims that .valueDeclaration is
never undefined. Sadness.)
kythe/kythe,kythe/kythe,kythe/kythe,kythe/kythe,kythe/kythe,kythe/kythe,kythe/kythe,kythe/kythe,kythe/kythe,kythe/kythe,kythe/kythe