Python Check For Undefined