adding array check, so now we can use array too

Now its Possible to ensure its an array.