Add small comment to Add/Mul optimization code
Test for non Basic at top expressions only
Use expr.func instead of type(expr)