[PATCH openEuler-22.09 v3 102/391] bpf: Extract nullable reg type conversion into a helper function