They accept any kind of points even if it does not match with the template parameter's `TreeKind` because the caller wants to check the relation in different kind of tree. Therefore, any callers need to consider the `TreeKind` more carefully and clarify the `TreeKind` makes developers easier to find a bug. Differential Revision: https://phabricator.services.mozilla.com/D281308