Venturing a guess: Make up a unit test that runs on all relevant functions of the class (I.e. type) that the object “2” belongs to, and pick functions that pass the test.
How could that possibly be safe in a non-pure programming language? There could be a function that deletes the n first files found in the working directory.