Python Test If Variable Exists