code: private static MutableLongArrayND validate(
          LongArrayND a, MutableLongArrayND result)
      {
          if (result == null)
          {
              result = LongArraysND.create(a.getSize());
          }
          else
          {
              Utils.checkForEqualSizes(a, result);
          }
          return result;
      }
docs: Validate the given result array against the given input array.
  If the result array is not <code>null</code>, it must have
  the same size as the input array. If it is <code>null</code>,
  then a new array with the same size as the input array will
  be created and returned.
  
  @param a The input array
  @param result The result array
  @return The result array
  @throws IllegalArgumentException If the given result array is
  not <code>null</code> and has a size that is different from
  that of the input array.