types2: fix doctests and convert hard coded values into doctests (which don't pass currently due to some strange error with doctest)