Is there any chance of space? if so we could either use trim() or StringUtils.hasText(..) here.