If the following selector has a length of 0
$(".my_class")
and I try to do $(".my_class").attr('value', 'test');
It doesn't cause any errors, but should I be checking the length first? What is considered a best practice?
I have a bunch of properties that may or may not exist and am wondering if it is ok to just set an empty jquery value.