Don't use asserts in the code

This is a partial fix from sympy/sympy#5090.  There is no more code modifications in the SymPy mpmath's tree.

Just in the case if these changes could be useful after unbundling mpmath...