if you wish to select a single message ID you do not require if statements
set the mask to 0x1FFFFFFF (assuming 29bit ID) and the filter to the ID you require
the hardware will only pass messages with that ID to your program
do a web search on canbus mask and filter