Use maybe to improve decodeHtmlEntities implementation