Python Check If A Variable Is Defined