I've found this in ERC223 specifications:
NOTE: The recommended way to check whether the _to is a contract or an address is to assemble the code of _to. If there is no code in _to, then this is an externally owned address, otherwise it's a contract.
What does "assemble the code" in this context mean?
Or, how do some contract knows it's sending funds to a contract not externally owned account?
If msg.data (not sure if this the right object) is empty it's externally owned account?