code: public static Entity getEntity(EntityWidget widget, StorageService storageService) {
  		Entity entity = widget.getEntity();				
  		if (entity == null) {	
              String entityId = widget.getInternalSettings().get(EntityWidget.ENTITY_ID);
              try {
                  entity = storageService.getEntityById(entityId);
              } catch (NotFoundException e) {                
                  e.printStackTrace();
              }      
              widget.setEntity(entity);
          }
  		return entity;
  	}
docs: if it is not set, we load it and we set it on widget