[1.5.x] Fixed #18026 -- Don't return an anonymous dict if extra_data in storage is empty.

Backport of 97121cb9 from master.