Fix types broken by cr/275975540.  Once this is rolled forward again, the compiler will no longer perform type subtraction on the "all" type `*`, and _will_ narrow typeof x === 'object' to object|null, rather than leaving it unnarrowed, increasing consistency between the Closure functions and the native constructs.  This breaks a number of places where narrowing has worked (or been ignored via the `any` type) in the past.  They can generally be fixed either by rearranging the order of checks, or by casting to `any` (particularly the latter when types were already `any` to begin with).
Fix types broken by cr/275975540.  Once this is rolled forward again, the compiler will no longer perform type subtraction on the "all" type `*`, and _will_ narrow typeof x === 'object' to object|null, rather than leaving it unnarrowed, increasing consistency between the Closure functions and the native constructs.  This breaks a number of places where narrowing has worked (or been ignored via the `any` type) in the past.  They can generally be fixed either by rearranging the order of checks, or by casting to `any` (particularly the latter when types were already `any` to begin with).

RELNOTES: n/a

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=277643482

google/closure-library,lucidsoftware/closure-library,lucidsoftware/closure-library,lucidsoftware/closure-library,google/closure-library,google/closure-library,google/closure-library,google/closure-library,lucidsoftware/closure-library