InDesign Remove Items with Fill, Stroke Error

I’m trying to delete every item with a fill called “Through Cut”. But it keeps giving me an error on items with no fill. I don’t know what to do here…any ideas?


		tell layer "White"
			repeat with x from (count every page item) to 1 by -1
				tell page item x
						if fill color of page item x is (swatch "Through Cut") then delete page item x
				end tell
			end repeat
		end tell

Hello RosienHoH and greetings from Germany.

Here this Script works right:

tell application id "com.adobe.indesign"
	tell document 1
		tell layer "White"
			repeat with x from (count every page item) to 1 by -1
				tell page item x
					if name of fill color is "Through Cut" then delete
				end tell
			end repeat
		end tell
	end tell
end tell

Perfect! Thank you very much for your help!