You don't need the ternary. Just return opCode == dbInsert will do.