Reads a value of type T from bytes.
if strict is true and the byte array contains more data than was read