I'm not sure how robust `instanceof` is for checking the type of array - perhaps [$.isArray](http://api.jquery.com/jQuery.isArray/) would be better?