Added empty() method for the LinkedList struct