The function computes the sum of the digits in the input string and returns the result modulo 4.

[CODE]:
```python
def f(x):
    if x.isdigit():
        total = sum(int(d) for d in x)
        return total % 4
    else:
        return None
```