Ensure $sreg and $ax aren't null to prevent array_key_exists warnings.

If either of those are null then warnings are generated:
PHP Warning:  array_key_exists() expects parameter 2 to be array, null given

Change-Id: Ia06484fd7534e3741a5356174d3576a01fa61599
Merge "Ensure $sreg and $ax aren't null to prevent array_key_exists warnings."