Improved input checking

Improved input checking: raise TypeError if unsupported branch is specifically selected, raise RuntimeError if no branches can be converted.