Fix to properly check for 'undefined'

Still working on issue #89, just to make sure I'm on the right track as I've pinpointed every file in Source/Core that needs to be fixed.