Fix bad check for empty jquery object.