help with ir input

Shouldn't the testing of the IR results be conditional upon "decode" returning a valid result?