added a new function: FormulaElement::getHandDataWithCheck() to clean up getLeftHandDataWithCheck() and getRightHandDataWithCheck().