Make sure that DIGEST-MD5 realms are not null before dereferencing

Fixes issue #45 (many thanks to ckopas for digging into this)