Using a method to automatically correct the type of the objects.