WIP: of_type impl