Don't access app_name if current_app is None

There are 2 other checks (one above and one bellow) that tests
current_app.something like this. This one was missing that check.

This happens if the app crashes before it really finishes initiating.

Change-Id: I00aee3f3a3577171ef77c669c00be989c315215a