Keyword search not working

I can see a lot of errors in the filters and I have to ask, did any of this code work before? Because the function that you created to filter things is most of the times being executed with undefined values.