remove unused code
better way to store lightbox

if it has another id '#lightbox' div ( but should be impossible )
simplify statement

Boolean(undefined) && Boolean('') === false // see MDN
if using $(document).off('keydown');

you will unbind other user define handler