Changed variable name

Also, added a check for html property in light object.