title: If Variable has no data try another?
body: <p>I am trying to create a database feeder at the end of a wizard in android. </p>
  
  <p>There will be multiple different types of titles, right now however I can only call one because I will get a null pointer exception.</p>
  
  <pre><code>String title = mWizardModel.findByKey("Surf:Post Title").getData().getString(Page.SIMPLE_DATA_KEY);
  </code></pre>
  
  <p>What I need to do is something like:</p>
  
  <pre><code>String title = mWizardModel.findByKey("Surf:Post Title" if no data try = "Snow:Post Title" = if no data try "Skate:Post Title").getData().getString(Page.SIMPLE_DATA_KEY);
  </code></pre>
  
  <p>However I'm not sure how to actually get this working I've tried lots of different if null statements but none of them seem to work for what I need since my database row is created like this. </p>
  
  <pre><code> String title = mWizardModel.findByKey("Surf:Post Title").getData().getString(Page.SIMPLE_DATA_KEY);
                  String maincat = mWizardModel.findByKey("Main Category").getData().getString(Page.SIMPLE_DATA_KEY);
                  String price = mWizardModel.findByKey("Surf:Price").getData().getString(Page.SIMPLE_DATA_KEY);
  
  
                  myDb.insertRow(title, price, maincat);
  </code></pre>
  
  <p>Here is the full code it is in an onClick</p>
  
  <pre><code> mNextButton.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
  
              if (mPager.getCurrentItem() == mCurrentPageSequence.size()) {
  
                  String title = mWizardModel.findByKey("Surf:Post Title").getData().getString(Page.SIMPLE_DATA_KEY);
                  String maincat = mWizardModel.findByKey("Main Category").getData().getString(Page.SIMPLE_DATA_KEY);
                  String price = mWizardModel.findByKey("Surf:Price").getData().getString(Page.SIMPLE_DATA_KEY);
  
  
                  myDb.insertRow(title, price, maincat);
  
                  DialogFragment dg = new DialogFragment() {
                      @Override
                      public Dialog onCreateDialog(Bundle savedInstanceState) {
                          return new AlertDialog.Builder(getActivity())
                                  .setMessage(R.string.submit_confirm_message)
                                  .setPositiveButton(R.string.submit_confirm_button, null)
                                  .setNegativeButton(android.R.string.cancel, null)
                                  .create();
                      }
  
                  };
                  dg.show(getSupportFragmentManager(), "place_order_dialog");
              } else {
                  if (mEditingAfterReview) {
                      mPager.setCurrentItem(mPagerAdapter.getCount() - 1);
                  } else {
                      mPager.setCurrentItem(mPager.getCurrentItem() + 1);
                  }
              }
  
          }
      });
  </code></pre>
  
  <p>Edit: Plot twist! this code only returns the last try in its sequence (check my comments)</p>
  
  <pre><code>mNextButton.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
  
              if (mPager.getCurrentItem() == mCurrentPageSequence.size()) {
  </code></pre>
  
  <p>//starts sequence</p>
  
  <pre><code>                Bundle t = mWizardModel.findByKey("Surf:Post Title").getData();
                  if ( t != null )
                  {
                      t = mWizardModel.findByKey("Snow:Post Title").getData();
                  }
                  if ( t != null )
                  { 
  </code></pre>
  
  <p>//only returns this Key! ("Skate:Post Title") none of the others.</p>
  
  <pre><code>                    t = mWizardModel.findByKey("Skate:Post Title").getData();
                  }
                  String title = t.getString(Page.SIMPLE_DATA_KEY);
  
  
                  Bundle p = mWizardModel.findByKey("Surf:Price").getData();
                  if ( p != null )
                  {
                      p = mWizardModel.findByKey("Snow:Price").getData();
                  }
                  if ( p != null )
                  {
                      p = mWizardModel.findByKey("Skate:Price").getData();
                  }
                  String price = p.getString(Page.SIMPLE_DATA_KEY);
  
                  String maincat = mWizardModel.findByKey("Main Category").getData().getString(Page.SIMPLE_DATA_KEY);
  
  
                  myDb.insertRow(title, price, maincat);
  
                  DialogFragment dg = new DialogFragment() {
                      @Override
                      public Dialog onCreateDialog(Bundle savedInstanceState) {
                          return new AlertDialog.Builder(getActivity())
                                  .setMessage(R.string.submit_confirm_message)
                                  .setPositiveButton(R.string.submit_confirm_button, null)
                                  .setNegativeButton(android.R.string.cancel, null)
                                  .create();
                      }
  
                  };
                  dg.show(getSupportFragmentManager(), "place_order_dialog");
              } else {
                  if (mEditingAfterReview) {
                      mPager.setCurrentItem(mPagerAdapter.getCount() - 1);
                  } else {
                      mPager.setCurrentItem(mPager.getCurrentItem() + 1);
                  }
              }
  
          }
      });
  </code></pre>