Would <code>!$this.attr( "id" )</code> work?