Parameter specified as non-null is null in ArrayAdaper
<p>I've extended ArrayAdapter for spinner:</p>

<pre><code>class OrderAdapter(context: Context, resource: Int, objects: List&lt;Order&gt;) : ArrayAdapter&lt;Order&gt;(context, resource, objects) {
        override fun getView(position: Int, convertView: View?, parent: ViewGroup): View? {
            val view = super.getView(position, convertView, parent)
            view?.let { view.find&lt;TextView&gt;(android.R.id.text1).text = getItem(position).name }
            return view
        }
        override fun getDropDownView(position: Int, convertView: View?, parent: ViewGroup): View? {
            val view = super.getDropDownView(position, convertView, parent)
            view?.let {view.find&lt;TextView&gt;(android.R.id.text1).text = getItem(position).name }
            return view
        }
    }
</code></pre>

<p>I'm getting exception:</p>

<pre><code>java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter convertView
                                                                                          at com.github.blabla.endlesss.ui.adapter.OrderAdapter.getView(OrderAdapter.kt:0)
</code></pre>

<p>Any ideas how to fix it?</p>