Change array key test to object attribute

Form classes no longer contain array access. Changed to object property access instead.