added checkWave

checkWave checks if a Wave object is valid.