I also like: ```val activity = requireNotNull(acti...
# android
g
I also like:
Copy code
val activity = requireNotNull(activity)
It throws illegal argument exception but has clear semantics and more explicit, it’s not an argument but can be considered as argument in this context Also, you can use this code if you want NPE instead
Copy code
val activity = activity!!
Non-nullable local variable looks better for me than additional nesting and let
👍🏼 1