array guess type improvements

guess type on size(a)
argument type assertion fix