In my code I'm not checking if a DOM element exists before I manipulate it and jquery does not seem to throw any errors, even if it doesn't exist.
$('.test').addClass('hide');
where the test class doesn't exist, but this doesn't throw any errors.
So is this expected? should I be checking if it exists first?