Add null checks on userId to all AnalyticsManager functions GitOrigin-RevId: ca4d50c9309aadf0145fd5135bbdecb7d297ea6f