deal with null in the calling code