modified hasTermWithDeg predicate
fix multiply polynoms bug (empty subtree issue)