gildor
11/02/2017, 1:27 AMval 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
val activity = activity!!
Non-nullable local variable looks better for me than additional nesting and let