Assert keyName not null and not undefined in get() and set()