getTiddlerRef = tiddler => {

  if (tiddler instanceof $tw.Tiddler) {

    return tiddler.fields.title;

  } else if (typeof tiddler === 'string') {

    return tiddler;

  } else {

    throw new InvalidArgumentException(tiddler);

  }

}
Gets a tiddler reference from a tRef or tObj

@param {Tiddler|string} tiddler - A tiddler reference or object.
@return {TiddlerReference|null} A tiddler reference (title)