fix: check for target type on monkey patch (no other case in this project, anyway)