Implement extend-type and extend-protocol