added check to binop/unop to catch tree operations