obj: add compile-time typesafety features