Is there any built in support in jQuery for basic assertion checking, primarily of things like \'expected number of returned elements\'.
For instance I may have a simple
You probably want http://docs.jquery.com/Traversing/eq#index:
Reduce the set of matched elements to a single element.
If your selector returns no objects then jQuery simply won't run the chained code as it has no elements to run them on