Fix null error in lightbox plugin when element is deleted.

Partially fixes #5792 (For only the lightbox plugin)
JSCS isn't 100% on the non-function bracket spacing, but we're also a few released behind again