code: protected Object available() throws ClassNotFoundException {
          Object result = null;
          if (getVar() != null) {
              Object value = pageContext.getAttribute(getVar(), getVarScope());
              if (value instanceof SlingBean) {
                  Class<?> type = getComponentType();
                  if (type != null && type.isAssignableFrom(value.getClass())) {
                      result = value;
                  }
              }
          }
          return result;
      }
docs: Check for an existing instance of the same var and assignable type