private static boolean isSafeToResolve(Object param, Project project) {
    Object object = tryUnpackPresentProvider(param, project);
    return object instanceof CharSequence ||
           object instanceof File ||
           object instanceof Path ||
           object instanceof SourceSetOutput ||
           GradleReflectionUtil.isInstance(object, "org.gradle.api.file.Directory") ||
           GradleReflectionUtil.isInstance(object, "org.gradle.api.file.RegularFile");
  }
private static boolean isSafeToResolve(Object param, Project project)