private static void assertIsEntity(Object entity) {
if (entity == null) {
throw new IllegalArgumentException("Provided object is null");
}
if (!isEntityClass(entity.getClass())) {
throw new NonEntityException("Provided object is not an @Entity");
}
}