Ignore callback for null AppId case and optimize the loop body.