check if it's a string before trying to do a replace on it
Merge pull request #37 from leaflet-extras/string-check

check if it's a string before trying to do a replace on it