I definitely like the typeof version. It would be nice to get rid of all those repeated prototypes, which are just typos waiting to happen. I haven't done real heavy cogitation to find anything wrong with this plan, or to think up anything it fails to cover. But it looks good to me.