Wouldn't it be better to have this statically type checked however and not having to relying on type checker specific features/implementations?