One thing is that we don't need to care if the array is empty here, we are only checking the data types to ensure we do not arrive at errors, if the arrays are empty then they will be merged as empty and the extension will carry on working just fine.

I would revert this part too and just leave in the data casting of `(int)` and the movement of `return $this` to a single position.