Check Digest comparison for nil

Instantly return false if comparing a Digest to a nil (ruby-core bug 9913)