Theres a couple of null checks that need to happen for that to effectively work.
Inside the lambda, w needs to be null checked. Also, w.getInteractActions() can return null if the widget does not have any interact actions, so that needs to be null checked.
Finally, plusButton itself can be null. Null check that before interacting with it.
You should also check if the array contains the string rather than just checking the first index