add spec for nil case