Add null checks in Files.isDirectory() and fixed null pointer in geonet aligner