Added getType function to Task class