def has_deriv(function):
    """ Check that function has derivative.

    Parameters
    ----------
    function : function
        Function which need to validate.

    Returns
    -------
    bool
        True if function has derivative, False otherwise.
    """
    return hasattr(function, 'deriv')
