Added a fix for $("#noexist").attr("id") breaking.