16x2 display not displaying text only white boxes on top row

... is there a way to recognize a defected display?

If you are seeing white boxes then it is unlikely that your display is defective.

You can test your jumper wires using the LCD backlight instead of using an external LED.

Don