Android: Fix NullPointerException in startActivityForResult processing