Check if `markers` is an object or a simple string before calling `Object.keys(marker).map(function (key)`