handle null paths in fileexists