correctly serialize nested sys expressions

of type string
fix possible NPEs in sys object and object array expressions