String f = null;
if ( new File( f + ".ext" ) .exists() )  ...