Simplify `may_have_kwargs =` and `is_unary =` expressions in `memoize`.