Hi All, I have a class where ``` data class Pay...
# getting-started
n
Hi All, I have a class where
Copy code
data class PayUPaymentTransaction(var mode : String) {
val status by lazy {
    if (mode.equals("CC", true) ) {
      SUCCESS
    } else {
      FAILURE
    }
  }
}
The mode is injected by the framework that binds the request with this object. Now whenever I am setting the status field to another non-nullable data object in this case, I am getting a null pointer exception, which means that the mode is null, but I did check that the mode is definitely injected by the framework while request binding. Can anyone give me any idea what am I doing wrong?