Implement `respondsTo()` for static and magic method detection.