fix problem with computing type when type is an array, or a proc that returns an array