Switched HasHead() to IsEmpty()