Python Test If Variable Not Defined