typo. check for NULL list, then empty list