fix possible NPEs in sys object and object array expressions