The bug was that since search parameters normally come from URL request parameters, a string value is expected here.