fix ancestor? when one of the argument is nil
fix clone to handle nil arg
add more edge tests