Is this line ok, or it must have `expr.func` instead of `type(expr)`?