Figure 2

Figure 2: Although checking input is certainly not rocket science, this example demonstrates the principle.