Raise an error if the api key is None.

Currently if the EXCEPTIONAL_API_KEY is None it looks as if the middleware is working properly. By checking if the APU key is None we avoid that scenario.