Checking to see if data exists before using it