I would change this for returning in case the conditions are not fulfilled, as is done when there is no mcc or mnc. As for the previous comment, the code would have less indentation and would be more readable, as almost everything is done inside this if statement. Also, some lines below are > 80 characters, so this would help to fix that.