Fixed issue that crashes if you pass nil if the value corresponding to the key does not exist

...he key does not exist