raise ValueError if origin is None
custom wraps decorator, functools fails on wrapping a wrapper