What I meant to say, on line 186, there also be a check that `val` is an array?