Make checkIR return a boolean