Return a user if exists.

def process_user(ctx, param, value):
    """Return a user if exists."""
    if value:
        if value.isdigit():
            user = User.query.get(str(value))
        else:
            user = User.query.filter(User.email == value).one_or_none()
        return user