Wrong is_array check

Gives error when not an array.
Merge pull request #21 from barryvdh/patch-2

Wrong is_array check