anchor.diff:          <<"storageId">> => StorageId,
           <<"storageName">> => StorageName
       },
  -    json_utils:encode(Body).
  +    json_utils:encode(filter_null_and_undefined_values(Body)).
   
   %%--------------------------------------------------------------------
   %% @private
  
positive.code: %% Constructs user details list.
  %% @end
  %%--------------------------------------------------------------------
  -spec get_user_details(session:id(), od_user:id()) -> UserDetails :: maps:map().
  get_user_details(SessionId, UserId) ->
      case user_logic:get_protected_data(SessionId, UserId) of
          {ok, #document{value = User}} ->
  
negative.code:             }
      end.
  
  -spec filter_null_and_undefined_values(map()) -> map().
  filter_null_and_undefined_values(Map) when is_map(Map) ->
      maps:fold(fun
          (_Key, undefined, AccIn) ->
              AccIn;
          (_Key, <<"undefined">>, AccIn) ->
              AccIn;
          (_Key, null, AccIn) ->
              AccIn;
          (_Key, <<"null">>, AccIn) ->
              AccIn;
          (Key, NestedMap, AccIn) when is_map(NestedMap) ->
              FilteredNestedMap = filter_null_and_undefined_values(NestedMap),
              case map_size(FilteredNestedMap) =:= 0 of
                  true -> AccIn;
                  false -> AccIn#{Key => FilteredNestedMap}
              end;
          (Key, Value, AccIn) ->
              AccIn#{Key => Value}
      end, #{}, Map).
  
  
  %%-------------------------------------------------------------------
  %% @private
  %% @doc
  %% Ensures that all values in map are binaries
  %% @end
  %%-------------------------------------------------------------------
  -spec ensure_binary_values(map()) -> map().
  ensure_binary_values(Map) ->
      maps:fold(fun(Key, Value, AccIn) ->
          AccIn#{Key => str_utils:to_binary(Value)}
  