Remove redundant instanceof check and extra semicolon