Inserts new value or replaces the old one if value associated with key already exists.
inserted/updated value
Exception if key is not valid
isValidKey
See Implementation
Inserts new value or replaces the old one if value associated with key already exists.