title: Android BottomSheetBehavior setState() NullPointerException
body: <p>I'm trying to implement <code>BottomSheetBehavior</code> from Android Support Design Library. I initialize <code>BottomSheetBehavior</code> like this:</p>
  
  <pre><code>private void initBottomSheet() {
          new AsyncTask&lt;Void, Void, Void&gt;() {
  
              View bottomSheetFrame = rootView.findViewById(R.id.bottom_sheet);
  
              }
  
              @Override
              protected Void doInBackground(Void... params) {
                  bottomSheetBehavior = BottomSheetBehavior.from(bottomSheetFrame);
  
                  bottomSheetBehavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() {
                      private boolean isOnTop = false;
  
                      @Override
                      public void onStateChanged(@NonNull View bottomSheet, int newState) {
                          switch (newState) {
  
                              case BottomSheetBehavior.STATE_DRAGGING: {
                                  ...
                              }
  
                              case BottomSheetBehavior.STATE_SETTLING: {
                                  ...
                              }
  
                              case BottomSheetBehavior.STATE_EXPANDED: {
                                 ...
                              }
  
                              case BottomSheetBehavior.STATE_COLLAPSED: {
                                  ...
                              }
  
                              case BottomSheetBehavior.STATE_HIDDEN: {
                                  ...
                              }
  
                              default: {
                                  break;
                              }
                          }
                      }
  
                      @Override
                      public void onSlide(@NonNull View bottomSheet, float slideOffset) {
                          ...
                  });
  
                  bottomSheetBehavior.setPeekHeight((int) Utils.convertDpToPixel(100f, activityContext));
                      bottomSheetBehavior.setState(BottomSheetBehavior.STATE_HIDDEN); // NPE here
  
                  return null;
              }
  
              @Override
              protected void onPostExecute(Void aVoid) {
                  super.onPostExecute(aVoid);
              }
          }.execute();
      }
  </code></pre>
  
  <p>It's very strange, because I can change state with <code>Button</code> click or some other action. Please, help me.</p>