# Buggy code
def clone(self, default_value=NoDefaultSpecified, **metadata):
    """Copy, optionally modifying default value and metadata.

    Clones the contents of this object into a new instance of the same
    class, and then modifies the cloned copy using the specified
    ``default_value`` and ``metadata``. Returns the cloned object as the
    result.

    Note that subclasses can change the signature of this method if
    needed, but should always call the 'super' method if possible.

    Parameters
    ----------
    default_value : any
        The new default value for the trait.
    **metadata : dict
        A dictionary of metadata names and corresponding values as
        arbitrary keyword arguments.

    """
    if "parent" not in metadata:
        metadata["parent"] = self

    new = self.__class__.__new__(self.__class__)
    new_dict = new.__dict__
    new_dict.update(self.__dict__)

    if "editor" in new_dict:
        del new_dict["editor"]

    if "_metadata" in new_dict:
        new._metadata = new._metadata.copy()
    else:
        new._metadata = {}

    new._metadata.update(metadata)

    if default_value is not NoDefaultSpecified:
        new.default_value = default_value
        if self.validate is not None:
            try:
                new.default_value = self.validate(None, None, default_value)
            except Exception:
                pass

    return new


# Traceback (TraitError)
In [4]: foo.instance_date = None
---------------------------------------------------------------------------
TraitError                                Traceback (most recent call last)
<ipython-input-4-fa663306bb41> in <module>()
----> 1 foo.instance_date = None

/Users/kchoi/.edm/envs/resist-py36/lib/python3.6/site-packages/traits/trait_handlers.py in error(self, object, name, value)
234         """
235         raise TraitError(
--> 236             object, name, self.full_info(object, name, value), value
237         )
238

TraitError: The 'instance_date' trait of a Foo instance must be a date, but a value of None <class 'NoneType'> was specified.

In [5]: foo.instance_time = None
---------------------------------------------------------------------------
TraitError                                Traceback (most recent call last)
<ipython-input-5-adf6a97a17be> in <module>()
----> 1 foo.instance_time = None

/Users/kchoi/.edm/envs/resist-py36/lib/python3.6/site-packages/traits/trait_handlers.py in error(self, object, name, value)
234         """
235         raise TraitError(
--> 236             object, name, self.full_info(object, name, value), value
237         )
238

TraitError: The 'instance_time' trait of a Foo instance must be a time, but a value of None <class 'NoneType'> was specified.

# Fixed code
def clone(self, default_value=NoDefaultSpecified, **metadata):
    """Copy, optionally modifying default value and metadata.

    Clones the contents of this object into a new instance of the same
    class, and then modifies the cloned copy using the specified
    ``default_value`` and ``metadata``. Returns the cloned object as the
    result.

    Note that subclasses can change the signature of this method if
    needed, but should always call the 'super' method if possible.

    Parameters
    ----------
    default_value : any
        The new default value for the trait.
    **metadata : dict
        A dictionary of metadata names and corresponding values as
        arbitrary keyword arguments.

    Returns
    -------
    clone : TraitType
        Clone of self.

    """
    if "parent" not in metadata:
        metadata["parent"] = self

    new = self.__class__.__new__(self.__class__)
    new_dict = new.__dict__
    new_dict.update(self.__dict__)

    if "editor" in new_dict:
        del new_dict["editor"]

    if "_metadata" in new_dict:
        new._metadata = new._metadata.copy()
    else:
        new._metadata = {}

    new._metadata.update(metadata)

    if default_value is not NoDefaultSpecified:
        new.default_value = default_value
        if self.validate is not None:
            try:
                new.default_value = self.validate(None, None, default_value)
            except Exception:
                pass

    return new