From [a previous discussion of this piece of code](https://github.com/yast/yast-network/pull/114#discussion_r6426599) I gather that the intention is to assert `current_item` not `nil`. That's OK. But `NoMethodError` is a wrong way of doing it! Instead, I propose this at the beginning of the method (or wherever it is first needed):
```ruby
yast_assert(
  !current_item.nil?,
  "EditNicName.initialize: current item has to be defined"
) or return nil
```

`yast_assert` has an assertion to check, a message to be logged, and returns true if it passed, or false if failed (which is then chained with `or` to return early.