title: Kotlin - Type mismatch: required: Context found: Context?
body: <p>I tried to make a PopupMenu</p>
  
  <pre><code>override fun onCreate(savedInstanceState: Bundle?) {
      super.onCreate(savedInstanceState)
  
      menu_btn.setOnClickListener {
          var menu: PopupMenu?
          menu = PopupMenu(this.context, it)
          menu.inflate(R.menu.card_menu)
  
          menu.setOnMenuItemClickListener {
              when(it.itemId) {
                  R.id.menu_modify -&gt; { Toast.makeText(context, "Modify", Toast.LENGTH_LONG).show()
                      true }
  
                  R.id.menu_delete -&gt; { Toast.makeText(context, "Delete", Toast.LENGTH_LONG).show()
                      true }
  
                  else -&gt; false
              }
          }
  
          menu.show()
      }
  }
  </code></pre>
  
  <p>but I get wiggly red line under </p>
  
  <pre><code>menu = PopupMenu(this.context, it)
  </code></pre>
  
  <p>That says: 
  Type mismatch.
  Required:
  Context
  Found:
  Contex?</p>
  
  <p>and even when I use !! - I get this error</p>
  
  <pre><code>java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
      at com.example.emek1.myapplication.FragmentOne.onCreate(FragmentOne.kt:24)
      at android.support.v4.app.Fragment.performCreate(Fragment.java:2414)
      at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1418)
      at android.support.v4.app.FragmentTransition.addToFirstInLastOut(FragmentTransition.java:1195)
      at android.support.v4.app.FragmentTransition.calculateFragments(FragmentTransition.java:1078)
      at android.support.v4.app.FragmentTransition.startTransitions(FragmentTransition.java:117)
      at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2408)
      at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2366)
      at android.support.v4.app.FragmentManagerImpl.execSingleAction(FragmentManager.java:2243)
      at android.support.v4.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:654)
      at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:146)
      at android.support.v4.view.ViewPager.populate(ViewPager.java:1244)
      at android.support.v4.view.ViewPager.populate(ViewPager.java:1092)
      at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1622)
  </code></pre>
  
  <p>Note: that it's not in MainActivity.kt
  It's a Fragment.</p>