Even though it's an extra 2 lines, I think this would be cleaner:

```
if (acceptanceDate) {
  data['acceptanceDate'] = acceptanceDate.valueOf();
}
```