check if  is string when checking file path