Spring has a lot of powerfull utility classes. One of them `StringUtils` and in this case it would be better to use `StringUtils.hasText(transformerFactoryImplClass)`