SMF already does that earlier on in the function:
    	// id_board must be a number....
    	$_REQUEST['boardid'] = isset($_REQUEST['boardid']) ? (int) $_REQUEST['boardid'] : 0;