I just stumbled upon pydantic. Especially this seems very promising. I guess we could dismiss most of our manual argument checking with pydantic...