How to check if filament sensor is ok?
You could try out this Arduino sketch and see if the Arduino can find the sensor on the bus, but I'm fairly certain that the chip has developed a fault and stopped responding to I²C commands, hence the error, or it's giving a value that's outside the limits set in the firmware. 

I'd also recommend getting in touch with Prusa Research, they have very good support and can tell you what part you need for your machine.