First steps in checking user-supplied filters

Checks for `=` and `__` in the filter
Checks that the relationship is valid