Lua Code:
local azeriteItemLocation = C_AzeriteItem.FindActiveAzeriteItem()
if (not azeriteItemLocation) then
return
end
Your code is a little difficult to read so I'm not 100% sure. But your code above would probably simply stop exactly here and dont execute code listed after that. Try to make your code more modular. So that every part is only accessed when it should.