non dovrebbe esser
codice:
!=
?

e poi non dovrebbe bastare

codice:
if(f._imagePath.value != "" && !checkFile(f._imagePath.value, ".jpg.gif.png")) {