public static boolean isFileValid(@Nullable File file){
  return file != null && file.exists();
}

public static boolean isFileValid ( @ Nullable File file ) { return file != null && file . exists ( ) ; }
returns if the given file is not null and exists in the file system
