only strip rhs when it is a mathinline instead of a piecewise expression