getValidInput_() {
    let newVar = this.variableNameInput_.value;
    if (newVar) {
      newVar = newVar.replace(/[\s\xa0]+/g, ' ').trim();
      if (
        newVar === Blockly.Msg['RENAME_VARIABLE'] ||
        newVar === Blockly.Msg['NEW_VARIABLE']
      ) {
        // Ok, not ALL names are legal...
        newVar = null;
      }
    }
    return newVar;
  }
Get the valid variable name, or null if the name is not valid.
@returns {string} The valid variable name, or null if the name exists.
@private