Convert port in service credentials from String to Integer if necessary.