Fix duplicate getTypeOfExpression function.