fix NPE for some Array types