The get(String key) method returns null if there is no key associated with the key.
Therefore, you can get the value, and check if it is null to know if it "exists":
Object myObject = c.get("key");
if(c == null) { // the object does not exist
// add the value
} else {
System.out.println(myObject);
}