public static @Nullable Class<?> getTaskIdentityType(@NotNull TaskInternal task) {
    if (is49OrBetter) {
      return task.getTaskIdentity().type;
    }
    if (task instanceof DynamicObjectAware) {
      DynamicObject dynamicObject = ((DynamicObjectAware)task).getAsDynamicObject();
      if (dynamicObject instanceof AbstractDynamicObject) {
        return ((AbstractDynamicObject)dynamicObject).getPublicType();
      }
    }
    return null;
  }
public static @Nullable Class<?> getTaskIdentityType(@NotNull TaskInternal task)