DRILL-1814: Check if writer state is OK before performing copy in copyAsValue() and copyAsField()