title: How to ignore null value in r and continue running the code
body: <pre><code>data_preprocessing &lt;-
    function(trx, var_names = var_names_list) {
      trx_input &lt;- data.frame(list(BankOwner = trx$BankOwner))
      data &lt;- trx_input %&gt;%
        mutate(full = ifelse(BankOwner, 1, 0))
    }
  </code></pre>
  
  <p>In this code,
  When BankOwner is present in the data frame in character format, it is working. When BankOwner == null without "" is giving me error. How do i solve this one. I would like to ignore when there is null in the dataset or apply the function.</p>