@Nullable public static <T>T firstNotNull(@Nullable T... vals){
  if (vals == null)   return null;
  for (  T val : vals) {
    if (val != null)     return val;
  }
  return null;
}

@ Nullable public static < T > T firstNotNull ( @ Nullable T ... vals ) { if ( vals == null ) return null ; for ( T val : vals ) { if ( val != null ) return val ; } return null ; }
returns a first non - null value in a given array , if such is present .
