for the final of 4.0 we had to change 1 parameter you get. Because the field_name wasnt a good idea because this gives people the idea that they can touch the elements like sanneke dit above.
forms[_form_name].elements[_field_name].getDataProviderID()
But this is wrong in a bg calc/method you shouldnt touch elements just data so now the field_name is just the dataproviderid so you can do directly
var dataproviderid= arguments[3]
if (_state[dataproviderid] == null) {xxx}