private boolean check(Point point, List<Point> arrayList){
        if (point == null){
            return true;
        }
        for (Point point1: arrayList){
            if (point1.equals(point)){
                return true;
            }
        }
        return false;
    }