Check if the received frame is correctly masked or not
Modified to check if valid frame was received