Add assertNode() helper to Node.lua to simplify error handling