fix: typos in map.js

(minor) 
- "of undefined" -> "or undefined"
- adding "()" for consistency