GenericJMX: fix potential dereference after NPE