Added if statement to check if a light exists