Add a safe check on read data function.