Whether the node has attribute.
attribute
bool hasAttribute(String attribute) => attributes?.containsKey(attribute) ?? false;