Add a cleanup method to handle wrong conversion of type like
java.util.Map.Entry