Hm, I would prefer a logic by this:
```
var cursorMemberId =
    (typeof cursorOrId === "string") ? cursorOrId : cursorOrId.getMemberId();
```
That way on reading one does not have to compare both branches, instead it is clear that the if-else logic just yields one value, which is the memberId.
Also no need to check for if (cursorOrId), because the API dox requires it is either a string or a cursor.