I have two maps, let's call them `oneMap` and `twoMap`.

I am iterating through all the keys in `oneMap`, and if the key exists in `twoMap` I do something
like

```

fun exampleFunc(oneMap: Map<String, Any>, twoMap: Map<String, Any>) {
   for((oneMapKey, oneMapVal) in oneMap) {
      if (twoMap.containsKey(oneMapKey)) {
         val twoMapVal = twoMap[oneMapKey]
         if (twoMapVal == oneMapVal) {
            //do more stuff
         }  
         //do more stuff, I have more if statements
      }      
   }
}

```

To avoid having more nested if statements, I was wondering if instead I could get rid of the

`if (twoMap.containsKey(oneMapKey))` check. if `twoMap` doesn't contain the `oneMapKey`, we get a null object, and my code still works fine. I was wondering if this is considered bad convention though

```

fun exampleFunc(oneMap: Map<String, Any>, twoMap: Map<String, Any>) {
   for((oneMapKey, oneMapVal) in oneMap) {

      val twoMapVal = twoMap[oneMapKey]
      if (twoMapVal == oneMapVal) {
         //do more stuff
      }  
      //do more stuff, I have more if statements

   }
}

```