I have this & it seems to work:
if ((obj.xxx != null) && (obj.xxx != "") && (typeof(obj.xxx) != "undefined"))
If only one if the statements is true will this equate to true or false? I feel I should be using the "or" operator but it breaks the widget.
if ((obj.xxx != null) || (obj.xxx != "") || (typeof(obj.xxx) != "undefined"))