Fix errors occuring when a user passes a NodeList or a jQuery object. Fixes #3.