fix(jqLite): check if element is defined in detach method