getDigest method Null safety

Digest getDigest(
  1. HashAlgorithm digestAlgorithm
)