If digitial isn't defined on exit, don't error out

If an error occurs on initialization, the exit handler tries to access digital pins when they aren't defined.  This checks to see that the digital pins are defined before trying to access them