Move port stripping to Node. Add check function to ensure valid
structure for graphs.