added preconditions to CaesarCipher