https://github.com/amplitude/experiment-js-client/blob/bf3f5c39f7171fa280b35d1eca9d173b7d426a4f/packages/analyticsConnector/src/util/equals.ts#L2 In my case, Amplitude-Typescript calls this function with null for userId (even though it was initialized with undefined)