```python
def sumofFactors(n) :
    """
    This function finds the sum of even factors of a number.
    """
    if not isinstance(n, int) or n < 0:
        # Assuming factors are defined for non-negative integers.
        # Behavior for other types is not specified. Returning 0 is a safe default.
        return 0
        
    total_sum = 0
    # Iterate through all possible even factors from 2 up to n, with a step of 2.
    for i in range(2, n + 1, 2):
        # If i divides n, it is an even factor.
        if n % i == 0:
            total_sum += i
            
    return total_sum

```