harden map search preview against invalid data

fixes #5492