ARIES-310: Add checks for null values and improve exception handling to make things consistent a bit more with the OSGi JMX specification.