def calculate(a, b):
    """Calculate the dot product of two vectors of the same length."""
    if len(b) != len(a):
        return None

    product = 0
    for a_i, b_i in zip(a, b):
        try:
            product += a_i * b_i
        except TypeError:
            return None
    return product