Wrong condition check. Should be if(StringUtil.isEmpty.......