In other programming language sometimes as easy as this:
// go v, ok := theMap[k] // js theObj.hasOwnProperty(k) // ruby theHash.has_key? k