Swep errors

I’m trying to remove the lua errors box that appears in the top left, on my server. The errors cause no problems or changes in game, so I’d just like to hide the box from showing. Here are the errors:



[ERROR] addons/m240/lua/weapons/weapon_m24sd/shared.lua:855: Tried to use a NULL entity!
  1. __index - [C]:-1
   2. unknown - addons/m240/lua/weapons/weapon_m24sd/shared.lua:855

Timer Failed! [361M24ReloadBoltBack][@addons/m240/lua/weapons/weapon_m24sd/shared.lua (line 853)]
A new round has started

[ERROR] addons/m240/lua/weapons/weapon_m24sd/shared.lua:861: Tried to use a NULL entity!
  1. __index - [C]:-1
   2. unknown - addons/m240/lua/weapons/weapon_m24sd/shared.lua:861

Timer Failed! [361M24ReloadBoltForward][@addons/m240/lua/weapons/weapon_m24sd/shared.lua (line 859)]


and here are lines 853 - 863 in the code causing the errors. This is part of a swep.



timer.Create( tostring( wep.EID ) .. "M24ReloadBoltBack", 1.8, 1, function()
			
			if ( wep.Owner ) then sound.Play( "weapons/m24sd/m24sd_bolt_back.wav", wep.Owner:GetShootPos(), 75, 100 ) end
			
		end )
		
		timer.Create( tostring( wep.EID ) .. "M24ReloadBoltForward", 2.30, 1, function()
			
			if ( wep.Owner ) then sound.Play( "weapons/m24sd/m24sd_bolt_forward.wav", wep.Owner:GetShootPos(), 75, 100 ) end
			
		end )


I’d still like to keep the m240 on my server it seems to be working fine visually, but remove the lua errors box if that is at all possible?

Also for some reason this error pops up like every 30 min +

Add a check to make sure the weapon is valid before checking if the owner is.