code: public static <T> boolean checkIfNullSupported(@Nonnull TypeSerializer<T> serializer) {
  		int length = serializer.getLength() > 0 ? serializer.getLength() : 1;
  		DataOutputSerializer dos = new DataOutputSerializer(length);
  		try {
  			serializer.serialize(null, dos);
  		}
  		catch (IOException | RuntimeException e) {
  			return false;
  		}
  		checkArgument(
  			serializer.getLength() < 0 || serializer.getLength() == dos.getCopyOfBuffer().length,
  			"The serialized form of the null value should have the same length " +
  				"as any other if the length is fixed in the serializer");
  		DataInputDeserializer dis = new DataInputDeserializer(dos.getSharedBuffer());
  		try {
  			checkArgument(serializer.deserialize(dis) == null);
  		}
  		catch (IOException e) {
  			throw new RuntimeException(
  				String.format("Unexpected failure to deserialize just serialized null value with %s",
  					serializer.getClass().getName()), e);
  		}
  		checkArgument(
  			serializer.copy(null) == null,
  			"Serializer %s has to be able properly copy null value if it can serialize it",
  			serializer.getClass().getName());
  		return true;
  	}
docs: This method checks if {@code serializer} supports {@code null} value.
  
  @param serializer serializer to check