add a test for null
handle the null case