I think that  this check should be moved inside _getHomeFolderPath so that the method will not raise MissingProfileExpception when token is None..