Safer way to sympify unsanitized input
