Remove redundant instanceof and add missing one