Refactored the apiKey checking statement