Making the changes according to your wishes, but want to address the following:

> What I don't want is this if each time we run this function. I want a as-linearized-as-possible code. 

This is a strawman—there should be no concerns over the "cost" of a condition statement's execution. If there is, then platform is the problem, not the program. 

> Explicit is better than implicit. 

Not always, good API design mean balance.

> I don't want magic functions that can take everything 

Parametric polymorphism isn't magic, it's a design pattern.

> (but, hey, not everything, a Number won't work) as argument.

`Number` is not a valid type for the operation at any of its stages. The `input` value is a string (type=text), the `{ filterValue: ... }` expects a string and the `find` API expects an object.