This will get better as the Android SDK willl introduce more and more @Nullableand @NonNull into their codebase. The reverse of this problem can also occur, for example, in a RecyclerView adapter, you would get an automatically generated `onBindViewHolder(holder: ViewHolder?, position: Int)`, but the holder is never null here and you can safely remove the “?”.

--

--

Android Team Lead at Tapsi

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store