function getNodeName(node) {
      if (node.id) {
        return node.id.name;
      }
      if (node.parent && node.parent.id) {
        return node.parent.id.name;
      }
      return '';
    }
Get name of node if available
@param {ASTNode} node The AST node being checked.
@return {string} The name of the node