public boolean isLazy() {
        return (boolean) getStateHelper().eval(PropertyKeys.lazy, () -> {
            boolean lazy = false;
            FacesContext context = getFacesContext();

            try {
                // if not set by xhtml, we need to check the type of the value binding
                Class<?> type = ELUtils.getType(context, getValueExpression("value"), this::getValue);

                if (type == null) {
                    if (LOGGER.isLoggable(Level.WARNING) && context.isProjectStage(ProjectStage.Development)) {
                        LOGGER.warning("Unable to automatically determine the `lazy` attribute, fallback to false. "
                                + "Either define the `lazy` attribute on the component or make sure the `value` attribute doesn't resolve to `null`. "
                                + "clientId: " + getClientId());
                    }
                }
                else {
                    lazy = LazyDataModel.class.isAssignableFrom(type);
                }
            }
            catch (Exception e) {
                LOGGER.severe("Exception occurred while determining the `lazy` attribute, fallback to false. "
                        + "To prevent this error set the `lazy` property directly on the component. "
                        + "Error: " + e.getMessage() + ". clientId: " + getClientId());
            }

            // remember in ViewState, to not do the same check again
            setLazy(lazy);

            return lazy;
        });
    }
Enhanced version of the Faces UIData.
primefaces/src/main/java/org/primefaces/component/api/PrimeUIData.java