Fix Null Ref when iterating the datatypes