If it is not an array, an exception will be thrown anyway to help developers to fix the mistake.
If we test if it is an array and do nothing if not, then there will be no error at all, which is less helpful to developers.