LPS-49778 allow getInternalCapability to return null

As part of the internal API, we need to know if a repository supports a
capability, but we don't want to expose the capability
collections (_exportedCapabilityClasses and
_supportedCapabilityClasses).

Allowing `getInternalCapability()` to return null we can check that
condition in a simple way.