#11: Fixing an error in testing tree generation

Fixed error in testing if generated tree evaluates to NaN or Infinity
for trivial case.