def check_value(value: bytearray, size_value: int) -> bool:
    """
    Check the correctness of the variable.

    This function checks the type ('bytes' or 'bytearray') and whether
    the size of the 'value' variable matches the 'size_value' value.

    Args:
        value: The variable that you want to check.
        saize_value: The required size of the variable.

    Returns:
        Check result.
    """
    result = True
    if (not isinstance(value, (bytes, bytearray))) or len(value) != size_value:
        result = False
    return result