Checking for localStorage before saving the api key to it.