public static void input(Type type, NullableDoubleState state, Block block, int position) {
   if (!state.isNull()) {
     return;
   }
   state.setNull(false);
   state.setDouble(type.getDouble(block, position));
 }
 @Override
 public void deserialize(Block block, int index, NullableDoubleState state) {
   state.setNull(block.isNull(index));
   if (!state.isNull()) {
     state.setDouble(type.getDouble(block, index));
   }
 }
 static void write(Type type, NullableDoubleState state, BlockBuilder out) {
   if (state.isNull()) {
     out.appendNull();
   } else {
     type.writeDouble(out, state.getDouble());
   }
 }
 @Override
 public void serialize(NullableDoubleState state, BlockBuilder out) {
   if (state.isNull()) {
     out.appendNull();
   } else {
     type.writeDouble(out, state.getDouble());
   }
 }