Return type of Content.getContent is already String, no need for type checking and toString. Use StringUtils.hasText to filter out null or empty strings.

Comment From: markpollack

thanks! merged in 2ecffc10c73404e7d1512c12d7fdaa30443280b5