Python Test If Variable Is Type