Java-API: "hasComment" method of class Task returns false