handle nil attributes properly by adding xsi:nil="true" to record values