Make math signatures hash and compare on string types