where did you defined it?
and you don't need to check the spellid to which the spellscript is bound, only spells you use in this script