def value_type(value, types):
    """
    Check that the ``value`` type is one of ``types``.

    Parameters
    ----------
    value: Any
        Variable to check its type.
    types: type or tuple or array
        Acceptable types.
        Could be one type, or a tuple or array of types.

    Raises
    ------
    ValueError
        Raised when ``value`` is not any of the specified ``types``.

    Returns
    -------
    success: bool
        Return True.

    """
    if not isinstance(value, types):
        if isinstance(types, (tuple, list)):
            string_types = types[0].__name__
            for i in range(1, len(types)):
                string_types += ' or ' + types[i].__name__

        else:
            string_types = types.__name__

        raise ValueError(
            'Value {value} is {value_type}, but should be {types}!'
            .format(value=value, value_type=type(value).__name__, types=string_types)
        )

    return True