Added shouldBeArray

If the browser has native support for Array.isArray(), this method is
used. Otherwise the method suggested in
http://stackoverflow.com/questions/4775722/javascript-check-if-object-is
-array is used