Allow passing filter to HasChild and HasParent filter

Closes #59