ValueChangeLister of TextField

I want to update one textField when another textField is updated with some manipulation. I didn’t find much info about ValueChange event of TextField. The code will be something as follows but is is returning null pointer exception at the line yearFromAdd…, any suggestions?

    public void init(Map<String, Object> params) {
        yearFrom.addValueChangeListener((ValueChangeListener) ( value) -> {
                showNotification("set", NotificationType.HUMANIZED);