ContainerBuilder: removed needless checking of service's type