Verification of convert inside the function

Depending on when the path is declared this solution would work in any case