handle empty useragent string gracefully