Fix port attribute types

Port types were not being checked correctly when deserializing nodes; this has been fixed.

Regression tests also added to integrate @wzli's contributed test schematics for coverage of this bug.