Refactor of ByteUtils and TypeUtils for compare equals and contains