private static void validateAlgorithm(HashAlgorithm alg) {
    if (alg == null) {
      throw new IllegalArgumentException("HashAlgorithm instance should be "
          + "provided in order to register a new algorithm");
    }
  }
Validates algorithm instance. A non-<code>null</code> instance should be
provided. An {@link IllegalArgumentException} is being thrown in case of
<code>null</code> instance

@param alg a {@link HashAlgorithm} instance to validate
src/main/java/net/spy/memcached/HashAlgorithmRegistry.java