Update app.py

Handle situation when Window is None (e.g. when App's build() returned nothing). Error message could be better, but it does the job.
Merge pull request #1075 from smishlayev/patch-2

Update app.py