i found the cause of the error which was that the ScriptChoice class implemented an interface with default interface method isOtherwise() returning Boolean. hence the 'extracting' method used this interface method instead of accessing the field directly. by using the method, it returned boolean false instead of the expected null