avoid null.instanceof