The examples erroneously create a TPI stream before checking that it is valid to do so. This is likely a copy-paste error, as on a first look it seems that we are doing the same for DBI. However, for DBI there are two checks, which has probably created this confusion:
The examples erroneously create a TPI stream before checking that it is valid to do so. This is likely a copy-paste error, as on a first look it seems that we are doing the same for DBI. However, for DBI there are two checks, which has probably created this confusion: