def check_orientation(orientation):
    """
    Check if orientation is valid input or not. Return True if is 'horizontal',
    False if 'vertical', raise Error if invalid input

    :param str orientation: str, allowed values are 'horizontal' and 'vertical'
    :return: True if is horizontal, False if vertical
    :rtype: bool
    :raises ValueError: invalid input
    """

    if orientation.lower().strip()[0] == "h":
        return True
    elif orientation.lower().strip()[0] == "v":
        return False
    else:
        raise ValueError("Invalid input orientation: %s." % orientation)