Prevent map error if search result is nil