use StringUtils.equals to prevent potential npe