adding try/catch blocks to handle tpetra/epetra casting in thyra adapters