refactor(findByPath): remove strange if

We already checking it at 13 line.