Fixing crash on empty scan

When scanning on one of my phones I ran into this issue when hitting
back without scanning anything.  A quick null check solves the issue,
and it functions normally now.