Indeed, use StringUtils.isEmpty(objectPolicy) to be safer.