Fixed passing non-Ranges into Document methods

Fixed issue introduced in b23265ad: ! takes precedence over instanceof.