Python Test If Variable Is A Class