I am very new to scala and I have simple `Map[String, String]`.

Example map: 

```
val map = Map("a" -> "abc", "b" -> "xyz")

```

I want to write a logic where if a particular key present in the map then call the encrypt() methods on the value and if the key is not present then return empty string.

One way I can do this is:

```
encrypt(map.getOrElse(MARKETPLACE_ID.toString, ""))

```

This will fail incase of key is not present and encrypt() method will be called using empty string.

Please help me to solve this in easiest way.