Fix the function TreeNode.minValueNode() which always returns nil
This would lead to a crash in TreeNode.delete at line 159, since minValueNode() always returned nil and then in line 159 to 161 we would have a nil-ptr access which would lead to a crash.
Therefore i introduce this small fix that return the object itself in TreeNode.minValue() when there is no left element left.
Fix the function TreeNode.minValueNode() which always returns nil
This would lead to a crash in TreeNode.delete at line 159, since minValueNode() always returned nil and then in line 159 to 161 we would have a nil-ptr access which would lead to a crash. Therefore i introduce this small fix that return the object itself in TreeNode.minValue() when there is no left element left.