I am trying to make statement : while calculation in array_sum if $stoploss is null in array, then use $stoploss as $exit_price
in below statement:
$expectancy_a = array_sum(($exit_price - ($stoploss)))/$number_trades;
$stoploss has below value:
array:10 [▼
  0 => null
  1 => null
  2 => 425
  3 => null
  4 => 77
]
how can i say in that statement, if $stoploss has null value then, take $exit_price as $stoploss.
I tired with if condition:
if (in_array(null, $stoploss, true)) {
$r_multiple[] = ($exit_price - $entry_price) / ($entry_price - $stoploss);
}
