handle array root element

An array to string conversion notice was thrown when the root element of the thing being validated is an array.