2009-10-22 instanceof の null チェック Java instanceof で null が渡された場合は false になることが言語仕様で保証されている。 if (obj instanceof String) { // ここでは obj は null ではない。 }