Throw exception when input is not an array and add 2 more unit tests