added exception for type of search

had an bug matching value of query with search types category and pid