added null check on ngx_array_push