safety checks, throw exception when illegal arguments;
Fix problem with null datastore: bug in get()