bugfix: binary_storage: check before writing a key with an empty value. Added test.