fix typo

I found a meaningless if condition which always become false, because not operator(`!`) is evaluated before the `instanceof` operator.