Added validation for non null encryptor.