Simple widget script returns error "accessed none trying to read property"

This script that I have written plenty of times is now returning errors and I cant find out why