fix t59: guard against failure of convert/piecewise.
fix t59: guard against failure of convert/piecewise.

suhailshergill/hakaru,zachsully/hakaru,zachsully/hakaru,zaxtax/hakaru,zaxtax/hakaru,bitemyapp/hakaru