Added topic type, fixed formatDate for null objects.