Added a function to compare polymorphic types upto renaming