moved two functions (get_type and _test_type) from enviorment/typing to util.
They are only used by tests and should not be inside the pyb code