but the cast to (array) is not required because of the is_array check just a line before, right?