Added guard for 'attributes' to exist in record before doing parsing