code: @SuppressWarnings("unchecked") private boolean isFieldPopulated(Task task, TaskField field)
     {
        boolean result = false;
        if (field != null)
        {
           Object value = task.getCachedValue(field);
           switch (field)
           {
              case PREDECESSORS:
              case SUCCESSORS:
              {
                 result = value != null && !((List<Relation>) value).isEmpty();
                 break;
              }
  
              default:
              {
                 result = value != null;
                 break;
              }
           }
        }
        return result;
     }
docs: Determine if a task field contains data.
  
  @param task task instance
  @param field target field
  @return true if the field contains data