private void checkObjectAvailability(Object object, String errorMessageCode, Object... args) {
        if (object == null
                || ((object instanceof String) && object.toString().trim().length() == 0)) {
            throw new WebSearchEngineException(MessageUtil.formatMessage(errorMessageCode, args));
        }
    }