added check to ensure returned excerpt is a string