Frage im Vorstellungsgespräch bei Redgate Software

Why should you check if a vector / array is empty before executing core function code?