defining data earlier, so that it stays in scope
added guard in case data received is nil
Merge pull request #811 from shatterednirvana/appcontroller-lives-if-apichecker-down

Validating that APIChecker data is a Hash before using it