idToNum
Parse a hex node ID string (with or without ! prefix) to its integer value, or null if the input is not a valid 32-bit hex value. Values larger than 0xFFFFFFFF return null rather than silently truncating, so a malformed !100000000 won't be misclassified as node 0.