def complete_leaf_value(return_type, result):
    """
    Complete a Scalar or Enum by serializing to a valid value, returning null if serialization is not possible.
    """
    # serialize = getattr(return_type, 'serialize', None)
    # assert serialize, 'Missing serialize method on type'

    return return_type.serialize(result)