main: check node id is not noneid

Meh, I don't think it's a huge deal. But if you want to distinguish then imo define a separate const for that purpose ("none" or "empty")