import typing


def read_byte(stream: typing.BinaryIO) -> typing.Optional[int]:
    """Reads a single byte from stream (or returns None if EOD is met)"""
    x = stream.read(1)
    if x:
        return x[0]

    return None