Cant find where is null error

Currently there is a error i cant seem to find as the error indicates that

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Panel/setting()
at Panel()

went to panel/setting to see what is wrong but still cant figure out what is wrong.
i am suppose to make the spawning of edible and inedible stop till end of the time…current time is 5s as i wanted to find out where is it that is wrong but original time is 60seconds. the spawning does not stop and it keep repeating even if i never add in spawnUp().

Need help at stopping the spawn after the end of 60s.

Thanks for the time to read the problem whoever is out there. (: