added failing test - optional fields do not add None as class attribute if the field is not present
fixed optional field issue