do some variable guarding because if $log is null then you will get a PHP error that ` $log["ip_address"]` is not accessible