BigW Consortium Gitlab
Properly ensure that the token exists and add defensively check for a non-nil value. Closes #4294