Handle serializing aware or naive datetimes