Empty key and invalid key testing