Fail earlier on improper configuration

This avoids trying to generate hashes for `undefined`.