Added sanity check for variable

I like to remove the password field from records when I'm not using the password value, this caused an error when creating the cache keys.