handle array root element

An array to string conversion notice was thrown when the root element of the thing being validated is was array. I added a unit test that passes before this commit, but would trigger a notice. Now it does not.