contract IsContract {
  /*
  * NOTE: this should NEVER be used for authentication
  * (see pitfalls: https://github.com/fergarrui/ethereum-security/tree/master/contracts/extcodesize).
  *
  * This is only intended to be used as a sanity check that an address is actually a contract,
  * RATHER THAN an address not being a contract.
  */
  function isContract(address _target) internal view returns (bool) {
    if (_target == address(0)) {
      return false;
    }

    uint256 size;
    assembly { size := extcodesize(_target) }
    return size > 0;
  }
}
// https://github.com/aragon/aragonOS/blob/07d309f5e81c768269dfc49373d41fac4528ebd2/contracts/common/IsContract.sol
function isContract(address _target) internal view returns (bool) {
  if (_target == address(0)) {
    return false;
  }

  uint256 size;
  assembly { size := extcodesize(_target) }
  return size > 0;
}

/*
 * NOTE: this should NEVER be used for authentication
 * (see pitfalls: https://github.com/fergarrui/ethereum-security/tree/master/contracts/extcodesize).
 *
 * This is only intended to be used as a sanity check that an address is actually a contract,
 * RATHER THAN an address not being a contract.
 */