In version 4 it is mendix.sys.Session
We currently working with Mendix 4.2.2 and there the widgets works fine. But I checked the widget in Mendix 4.3.1 and you're right, you get an error.
I seems that the method mx.session.isGuest() now returns null if it is an anonymous user. If you are logged in, you get the correct 'false' answer. Seems to be an mendix bug, or I am using the wrong function, although i could not find any other isGuest() function.
You can fix the widget by replacing the code with:
var guest = mx.session.isGuest(); if (guest == null || guest == true || guest == "true")
I hoped this helped.