Proper methodology for checking contract addresses

I’m working on this as well. There is an opcode called extcodehash . It says

The EXTCODEHASH of the account without code is c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 what is the keccack256 hash of empty data

So I think there is a possibility to check isContract by using this extcodehash combined with the c5d2460186f72...

function isContract(address addr) internal view returns (bool) {
    bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;

    bytes32 codehash;
    assembly {
        codehash := extcodehash(addr)
    return (codehash != 0x0 && codehash != accountHash);

This means if the code hash does not equal to 0 nor c5d2460186f72... , can we conclude this is the contract address?