LUA Error | NIL

hey this code

hook.Add(“PreDrawHalos”, “EntityHalos”, function()
local tbl = {}
for k,v in pairs(ents.GetAll()) do
if(v.ShouldDrawHalo) then
table.insert(tbl, v)
end
end
effects.halo.Add(tbl, Color(255, 255, 255), 5, 5, 2)
end)

is spammind the console saying NIL all the time can you pls help me?

Please post the exact error message you are getting in the console