Since this function has an array typehint we should do the array check before calling it.