Added some typecast helpers to NSObject.