posted 18 years ago
First of all, it's instanceof with a small o, not a capital O, and second, although instanceof returns false when you put null on the right hand side, it doesn't check for equality if the right hand side is not null.
Don't use instanceof just for this purpose, that's not what it was meant for.