Fixed #1243: Detect comparisons with 'typeof x' and check the other operand.

Signed-off-by: Anton Kovalyov <anton@kovalyov.net>