After reading pkdvalis post What Is the Optional Chaining Operator, and How Does It Work? I also believe that I would not even need optional chaining on
playSong(userData?.songs[0].id);
as optional chaining is basically pointless for missing properties: By default, missing properties will throw undefined, and optional chaining will not change that.