Change lighting function to set non-existent lights to null instead of undefined