}
protected void assertArgType(Expr expr, ExprType type) throws ExprException {
if (expr == null) {
if (type != null)
throw new ExprException("Invalid empty argument for function " +
getClass().getSimpleName());
} else {
if (!expr.type.equals(type)) {
throw new ExprException("Invalid argument type for function " +
getClass().getSimpleName());
}
}
}