Fix for when the array is empty

`$$.fn.hasClass` and `$$.fn.style` will both throw exceptions if the current selection of elements is empty.