code: @Transactional
      public boolean isPropertyNull(PK id, SingularAttribute<E, ?> property) {
          checkNotNull(id, "The id cannot be null");
          checkNotNull(property, "The property cannot be null");
          CriteriaBuilder builder = entityManager.getCriteriaBuilder();
          CriteriaQuery<Long> criteriaQuery = builder.createQuery(Long.class);
          Root<E> root = criteriaQuery.from(type);
          criteriaQuery = criteriaQuery.select(builder.count(root));
  
          // predicate
          Predicate idPredicate = builder.equal(root.get("id"), id);
          Predicate isNullPredicate = builder.isNull(root.get(property));
          criteriaQuery = criteriaQuery.where(jpaUtil.andPredicate(builder, idPredicate, isNullPredicate));
  
          TypedQuery<Long> typedQuery = entityManager.createQuery(criteriaQuery);
          return typedQuery.getSingleResult().intValue() == 1;
      }
docs: /*
  Helper to determine if the passed given property is null. Used mainly on binary lazy loaded property.
  
  @param id       the entity id
  @param property the property to check