Objects.isNull(shortestPath) 로 객체가 null인지 true, false로 반환해준다.