preminary type check; got around out of bounce error
fixed merge conflict
type checking except for int[] a = [1, 2, true] case
fixed merge conflict