`instanceof` will fail across YUI instances. Duck-typing would be more robust in this case.