I suspect you want if (action.GetID()) given the return code you have from ConvertActionCommandToAction